<asp:TextBox runat="server" id="TxtDemo" value="" onkeydown="btn_Enable()"/>
<asp:Button runat="server" id="btnDemo">Some test</button>
<asp:Button runat="server" id="btnDemo">Some test</button>
Javascript:
window.onload = function()
{
document.getElementById('btnDemo').disabled = true;
}
function btn_Enable() {
var EN=document.getElementById(TxtDemo).value;
if(EN=='') {
document.getElementById('btnDemo').disabled=true;
}
else
{ document.getElementById('btnDemo').disabled=false; } }
No comments:
Post a Comment