doujuxin7392 2015-08-16 10:32
浏览 43

JavaScript函数警告框在Firefox中不起作用

I have the following code in my JavaScript that will show an alert box. The code works fine in Google Chrome and IE, but not in Firefox.

$(document).ready( function() {
                                jAlert('You have already selected <?php echo $int; ?> theme.
Please deselect one of the themes to choose a new theme.', 'Number Of Theme Exceeded');
                        });
                        return false; 

How can I go about changing it to allow it to work in Firefox?

  • 写回答

1条回答 默认 最新

  • dtef9322 2015-08-16 10:58
    关注

    From your question it is very difficult to get the error. As I don't know the code of your jAlert. But there may be many reasons behind that.

    First: Check your jQuery version and browser compatibility.

    Second: Your browser version (Old/New)

    And from your code One thing seems to be correct. You return false; outside of your function. Which should be like that-

    $(document).ready( function() {
        jAlert('You have already selected <?php echo $int; ?> theme.
    Please deselect one of the themes to choose a new theme.', 'Number Of Theme Exceeded');
    //return false;
    /*
     return false should be inside of some function. 
     If you are copy this code from somewhere then comment this line.
    */                 
    });
    
    评论

报告相同问题?

悬赏问题

  • ¥15 求解达问题(有红包)
  • ¥15 请解包一个pak文件
  • ¥15 不同系统编译兼容问题
  • ¥100 三相直流充电模块对数字电源芯片在物理上它必须具备哪些功能和性能?
  • ¥30 数字电源对DSP芯片的具体要求
  • ¥20 antv g6 折线边如何变为钝角
  • ¥30 如何在Matlab或Python中 设置饼图的高度
  • ¥15 nginx中的CORS策略应该如何配置
  • ¥30 信号与系统实验:采样定理分析
  • ¥100 我想找人帮我写Python 的股票分析代码,有意请加mathtao