简体   繁体   English

javascript如何在chrome和IE上按预期工作,但不是FF

[英]How could javascript work as desired on chrome and IE, but not FF

For some reason my 2 amount recieved inputs show up blank in Firefox, but work correctly in Chrome and Internet Explorer. 出于某种原因,我收到的2个金额的输入在Firefox中显示为空白,但在Chrome和Internet Explorer中正常工作。

Can anyone explain why this is? 谁能解释为什么会这样?

http://vbwpublishing.com/calcpage.php http://vbwpublishing.com/calcpage.php

also bonus points to anyone who can tell me why the hardcover calculator will allow me to put more than 1200 pages when it should be throwing an error 也可以告诉我为什么精装计算器允许我放置超过1200页的任何人应该抛出错误的奖励积分

Check your FF javascript console (shift-ctrl-J): 检查你的FF javascript控制台(shift-ctrl-J):

scd1 is not defined   http://vbwpublishing.com/calcpage.php    Line: 403

which is 是的

if ($(scd1).hasClass('s')){sd = .25}

You're not executing that in a .ready() block, and the <li> with that ID is farther down the page, so it's not defined yet that point, killing the rest of the script execution. 你没有在.ready()块中执行它,并且带有该ID的<li>在页面的下方,所以它还没有定义到那一点,从而杀死了脚本执行的其余部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM