日期:2014-05-16 浏览次数:20432 次
<form id="form1" name="form1" method="post">
<label for="daan"><p>请填入您的答案:</p></label>
<p>
<input type="text" name="daan" id="daan"/>
</p>
<input type="submit" name="submit" id="submit" value="提交" disabled="disabled" />
</form>
<form id="form1" name="form1" method="post">
<label for="daan"><p>请填入您的答案:</p></label>
<p>
<input type="text" name="daan" id="daan"/>
</p>
<input type="submit" name="submit" id="submit" value="提交" disabled="disabled" />
</form>
<script type="text/javascript">
document.getElementById("daan").onblur=function(){
document.getElementById("submit").disabled=this.value=="";
}
</script>