帮助使用 javascript 在标签中显示成本
我对 javascript 完全陌生,我想知道是否有人可以帮助我完成一个简单的查询!
我有以下代码: http://jsfiddle.net/J47E6/
我已经设法让隐藏/显示功能正常工作,但我正在努力解决的是让价格显示在标签上。
有人能指出我正确的方向吗?
I'm completely new to javascript and I was wondernig if someone could help me with probably a simple query!
I have the following code:
http://jsfiddle.net/J47E6/
I've managed to get the hide/show functions to work, but what I'm struggling with is getting the price to display in the label.
Can someone point me in the right direction?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您的脚本的新版本现已更正。我注意到您在 jQuery (#) 中错过了折扣选择的 id 选择器。
该方法现在有效,但问题是,我不确定如何计算你的数学,因此我无法完成它。
});
“package”和“discountSelection”从何而来。回答这些问题,我们就会为您完成。
New version of your script is now corrected. I noticed you missed an id selector in your jQuery (#) for discountSelection.
The method now works, but problem is, I'm unsure of how to caculate your math therefor I cannot complete it.
});
Where does 'package' and 'discountSelection' come from. answer those and this'll be done for you.
看一下:修改后的代码
JS 中有很多错误,标记也不一致。
Have a look at: revised code
There were a number of errors in JS and inconsistencies in the markup.