<script language=Javascript> //自己动手为string添加Trim
String.prototype.Trim = function(){return this.replace(/^\s+|\s+$/g,"");}if(document.formName.inputName.value.Trim()=="") alert("empty");
</script>定时刷新:
<meta http-equiv="refresh" content="5"> 5秒刷新
String.prototype.Trim = function(){return this.replace(/^\s+|\s+$/g,"");}if(document.formName.inputName.value.Trim()=="") alert("empty");
</script>定时刷新:
<meta http-equiv="refresh" content="5"> 5秒刷新
alert("text is null!");
......}
2 function ff() //________
{
window.reload()
abc=setTimeout("ff()",刷新秒数)
}
ff();
<script>
function aa()
{
var bb=document.form1.text1.value
if(bb=="")
{
alert("是空的")
}
else
{
alert("非空")
}
}</script>
{
Date now=new Date()
Date setTime=new Date();
if(now==setTime)
window.location.href=***
setTimeout("init()",1000);
}<body onload="init()">
http://community.csdn.net/Expert/topic/3472/3472337.xml?temp=.1701624