62,046
社区成员
发帖
与我相关
我的任务
分享
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title></title>
<script type="text/javascript" language="javascript">
function a() {
var txt = document.getElementById("Label1").innerText;
alert(txt);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="my label "></asp:Label>
<input type="button" id="btn" value="取值" onclick="a()" />
</div>
</form>
</body>
</html>