如何用jquery获取服务器控件的属性值(提示undefined)
<htmlxmlns="http://www.w3.org/1999/xhtml"><headrunat="server"><title></title></head><...
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body onload="test()">
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Button" ToolTip="tooltip" />
</form>
</body>
</html>
<script type="text/javascript" language="javascript">
function test() {
var divH = $("#Button1");
alert(divH.attr("ToolTip"));
}
</script> 展开
<head runat="server">
<title></title>
</head>
<body onload="test()">
<form id="form1" runat="server">
<asp:Button ID="Button1" runat="server" Text="Button" ToolTip="tooltip" />
</form>
</body>
</html>
<script type="text/javascript" language="javascript">
function test() {
var divH = $("#Button1");
alert(divH.attr("ToolTip"));
}
</script> 展开
2个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询