zl程序教程

您现在的位置是:首页 >  后端

当前栏目

改变状态栏文字的js代码

JS代码 改变 文字 状态栏
2023-06-13 09:15:28 时间
复制代码代码如下:

<!DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<htmlxmlns="http://www.w3.org/1999/xhtml">
<head>
<metahttp-equiv="Content-Type"content="text/html;charset=utf-8"/>
<title>无标题文档</title>
<scriptlanguage="javascript">
words1="欢迎光临";
now=newDate()
words2=now.toLocaleString();
flag=0;
functionflash()
{
if(flag==0)
{
window.status=words1;
flag=1;
}
else
{
window.status=words2;
flag=0;
}
setTimeout("flash()",2000);
}
</script>
</head>
<bodyonload="flash()">
网页内容
</body>
</html>