jQuery code not working in IE

后端 未结 2 411
鱼传尺愫
鱼传尺愫 2021-01-14 15:36

I am a novice in jQuery, and am trying to create this page. In all browsers I tested, when I click the red button a coupon code appears, except for IE. Why does this happen?

相关标签:
2条回答
  • 2021-01-14 15:41

    I think you're missing your document.ready function. Add this line right above the first line of your script:

    $(document).ready(function() {
    
    0 讨论(0)
  • 2021-01-14 16:01

    Your script is not executing in IE. To fix it, just change the script type to text/javascript.

    IE does not recognize the application/javascript type as being a script at all.

    0 讨论(0)
提交回复
热议问题