<form id="form1" runat="server">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<script id="scr1" type ="text/javascript" >
function getValue() {
var x = document.getElementById("TextBox1");
//alert(x.getAttribute("Text"))
alert(x.)
}
</script>
<input id="Button1" type="button" value="button" onclick ="getValue()" />
</form>
这段代码的返回值总是 “null”,不禁要问,JavaScript可以访问服务器端控件吗?
神不在的星期二
慕婉清6462132
FFIVE
慕桂英546537
相关分类