Jquery.click没有开火 [英] Jquery .click not firing
本文介绍了Jquery.click没有开火的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
当我点击按钮时,页面会重新加载,并且什么都不会发生。
Trying to learn JQuery here, im starting off really simple.
继承人我的JS:
Heres my JS:
这是我的html:
Here's my html:
推荐答案
我想你忘记了document.ready ..
解决方案
p>
i think you forgot document.ready..
$(function () { //<--- here..the codes below is called whn document is ready
$("#submitShout").click(function () {
alert('hi');
});
});
这篇关于Jquery.click没有开火的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文