<script language=javascript>
function check()
{
if ((document.query.keyword.value=="")||(document.query.keyword.value.indexOf(" ")!=0))
{window.alert("请输入需要查询的关键字!");
return false;
}
}
</script>
function check()
{
if ((document.query.keyword.value=="")||(document.query.keyword.value.indexOf(" ")!=0))
{window.alert("请输入需要查询的关键字!");
return false;
}
}
</script>
<script language=Javascript> //自己动手为string添加Trim
function String.prototype.Trim() {return this.replace(/(^\s*)|(\s*$)/g,"");}
</script>
<input onblur="if(!this.value.Trim())alert('error')">
</body>