在JavaScript中怎样改变服务器控件LinkButton的Enabled属性
999999
回复:(bygg)
楼上的方法我试过了,只可以改变显示,不能约束它是否可用 也就是说当它变为灰色的时候,点击还是可用的
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
<script language="javascript">
function aaa()
{
document.getElementById("LinkButton1").disabled=true;
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:LinkButton ID="LinkButton1" runat="server" Enabled="false">LinkButton</asp:LinkButton>
<input id="Button1" type="button" value="button" onclick="aaa()" /></div>
</form>
</body>
</html>