87,907
社区成员
发帖
与我相关
我的任务
分享
<INPUT type="text" id="aa" value="" onpropertychange="document.getElementById('bb').disabled = !this.value;">
<INPUT type="button" id="bb" value="确定" disabled >
<TD bgColor=#ffffff height=25><INPUT type="text" name="txt1" value="" onchange="document.getElementById('btn1').disabled=false;"> </TD>
<TD bgColor=#ffffff height=25><INPUT type="button" name="btn1" value="确定" onclick="this.disabled=true;" disabled > </TD>
<html>
<body>
<input type="text" onkeyup="fun(this)"/> <input type="button" id="btn" value="click" disabled="true"/>
<script>
function fun(el)
{
if(el.value!="")
document.getElementById("btn").disabled = false;
else
document.getElementById("btn").disabled = true;
}
</script>
</html>