SCRIPT1002: Syntax Error, Line 1 Character 6

后端 未结 1 1715
南笙
南笙 2021-02-20 05:07

In the IE developer (F12) console, I\'ve managed to get my pages to run without errors; all but one!

SCRIPT1002: Syntax error
mypage.php, line 1 ch

相关标签:
1条回答
  • 2021-02-20 05:27

    "WAIT... does IE9 not like <a href="javascript:void();" id="donateButton"> ?? It seems thats the problem..?"
    — Comment by Chud37

    Yes, that is the problem. void is an operator, not a function. Use javascript:void 0 , javascript:void(0) or #. Even better, add event.preventDefault() to your function:

    $('#donateButton').click(function(ev) {
        ev.preventDefault();
        alert('hello');
    });
    
    0 讨论(0)
提交回复
热议问题