vs2010中的jQuery脚本 [英] JQuery script in vs2010

查看:106
本文介绍了vs2010中的jQuery脚本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我已经使用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

推荐答案

(文档).ready(功能(){
(document).ready(function () {


(文档).ready(
(document).ready(function () {


( # btnHelloWorld输入" ).click(功能(){ alert(" ); }); }); });
("#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


这篇关于vs2010中的jQuery脚本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆