keyup函数不能在firefox上运行

时间:2014-02-20 18:30:26

标签: javascript jquery google-chrome firefox

我知道这张贴很多次了。但是我用手风琴我的代码,我的keyup功能不起作用firefox,但在其他浏览器上完全没问题,所以这里是我的代码

$("#forecast").on("keyup", "#budget", function(){
                setTimeout(postdata, 3000);
                    //alert("hello budget!");
                });


function postdata(){
                var x = parseInt($("#budget").val());
                var y = parseInt($("#totexpense").val());
                var z = x-y;
                lblValue3.innerText = " Profit: " + z;
                if(x > y){
                    //alert("The study is profitable.");
                    lblValue2.innerText = " Study is  Profitable";
                }
                else{
                    //alert("The study is unprofitable.");
                    lblValue2.innerText = " Study is  unprofitable";
                }
            }

任何想法如何让我在firefox上工作谢谢

0 个答案:

没有答案