onChange function is not defined

前端 未结 5 959
醉酒成梦
醉酒成梦 2020-12-20 11:25

This has got to be something simple. I searched the internet and only found syntax errors as the cause of this problem, but I can\'t find a syntax error.

Here\'s the

5条回答
  •  既然无缘
    2020-12-20 12:08

    The hi function is only defined in the ready block. Outside, it doesn't exist anymore.

    You don't need to wrap function definitions in .ready(), so just remove it. Alternatively, define the function like this:

    window.hi = function() {...}
    

提交回复
热议问题