我试图在 asp.net 按钮中触发 jquery。它没有被触发。出了什么问题?
//代码
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<script type="text/javascript" src ="Scripts/jquery-1.4.1.js"></script>
<script type ="text/javascript">
$(document.ready(function(){
$("#<%=Button1.ClientID %>").click(function () {
showalert('HTML Button Clicked');
});
});
function showalert(btnText) {
alert(btnText)
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Height="41px"
style="margin-left: 340px; margin-top: 197px"
Text="Button" Width="147px"/>
</div>
</form>
</body>
</html>
有人能帮我吗?