js控制搜索内容为空则搜索按钮不能用
<form name="myform" method="get" action="" target="_parent">
<input type="text" name="telephone" id="telephone" value="" size="20" onkeyup="check()" />
<input type="submit" value=" 查 询 " disabled="disabled" id="btn" />
</form>
<script type="text/javascript">
function check()
{
var btn = document.getElementById('btn');
if (document.myform.telephone.value != "")
btn.disabled = '';
else
btn.disabled = 'disabled';
}
</script>