jQuery获取不到asp.net页面标签的ID(不是服务器控件!)
<%@PageLanguage="C#"AutoEventWireup="true"CodeFile="a.aspx.cs"Inherits="a"%><!DOCTYPE...
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="a.aspx.cs" Inherits="a" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns=" http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <script type="text/javascript" src="Scripts/jquery-1.4.1.js"></script> <script type="text/javascript"> $("btn").click(function () { window.alert("ko"); }); </script> </head> <body> <form id="form1" runat="server"> <div> <input type="button" value="按钮" id="btn" /> </div> </form> </body> </html>
展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询