问题描述
大家好,
我已经使用VS2010创建了一个Web表单.在此Web表单上,已引入了一个按钮.
我想做的是当用户单击此按钮时调用jquery.js.
到目前为止,我已经实现了以下内容:
1.在Site.Master页面中,我包含了
Hello All,
I have created a web form using VS2010. On this web form a button has been introduced.
What I like to do is to call a jquery.js when a user click on this button.
The following is what I have implemented so far:
1.In Site.Master page I have included
<script src="Scripts/JButton.js" type="text/javascript"></script>
2.在Scripts文件夹中创建
2.In Scripts folder created
$(document).ready(function () {
$(document).ready(function () {
$("#btnHelloWorld input").click(function () {
alert("Hello world!");
});
});
});
问题是:当我单击Web表单上的此按钮时,什么也没有发生.
有人可以帮忙吗?与往常一样,非常感谢您的帮助
The issue is: When I click this button on my web form nothing happens at all.
Could anybody please help? As always your help is very much appreciated
推荐答案
问题是:当我单击Web表单上的此按钮时,什么也没有发生.
有人可以帮忙吗?与往常一样,非常感谢您的帮助
The issue is: When I click this button on my web form nothing happens at all.
Could anybody please help? As always your help is very much appreciated
这篇关于vs2010中的jQuery脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!