http://www.cssrain.cn/article.asp?id=560
<link >默认样式</a>
图片切换:
<select name="selectface" onchange="cssrain(options[selectedIndex].value);">
<script>
for(i=1;i<12;i++)
{
document.write("<option value=http://www.makewing.com/lanren/emotions/07/"+i+".gif>头像"+i+"</option>");
}
</script>
</select>
<img ).src=obj;
}
</SCRIPT>
<script>
for(i=1;i<12;i++)
{
document.write("<option value=http://www.makewing.com/lanren/emotions/07/"+i+".gif>头像"+i+"</option>");
}
</script>
</select>
<img ).src=obj;
}
</SCRIPT>
随即背景:
<Script Language="JavaScript">
image = new Array(2); //定义image为图片数量的数组
image [0] = 'http://www.cssrain.cn/skins/tim/logo-jq.gif' //背景图象的路径
image [1] = 'http://www.cssrain.cn/demo/JQuery+API/logo-json.gif'
image [2] = 'http://www.cssrain.cn/skins/tim/isll_t.gif'
number = Math.floor(Math.random() * image.length);
document.write("<BODY BACKGROUND="+image[number]+">");
</Script>
image = new Array(2); //定义image为图片数量的数组
image [0] = 'http://www.cssrain.cn/skins/tim/logo-jq.gif' //背景图象的路径
image [1] = 'http://www.cssrain.cn/demo/JQuery+API/logo-json.gif'
image [2] = 'http://www.cssrain.cn/skins/tim/isll_t.gif'
number = Math.floor(Math.random() * image.length);
document.write("<BODY BACKGROUND="+image[number]+">");
</Script>
网页最后修改时间:
<script language="LiveScript">
<!-- Hiding
today = new Date()
document.write("现 在 时 间 是: ",today.getHours(),":",today.getMinutes())
document.write("<br>今 天 日 期 为: ", today.getMonth()+1,"/",today.getDate(),"/",today.getYear());
// end hiding contents -->
</script>
<html>
<body>
This is a simple HTML- page.
<br>
Last changes:
<script language="LiveScript">
<!-- hide script from old browsers
document.write(document.lastModified)
// end hiding contents -->
</script>
</body>
</html>
<!-- Hiding
today = new Date()
document.write("现 在 时 间 是: ",today.getHours(),":",today.getMinutes())
document.write("<br>今 天 日 期 为: ", today.getMonth()+1,"/",today.getDate(),"/",today.getYear());
// end hiding contents -->
</script>
<html>
<body>
This is a simple HTML- page.
<br>
Last changes:
<script language="LiveScript">
<!-- hide script from old browsers
document.write(document.lastModified)
// end hiding contents -->
</script>
</body>
</html>
获取上传文件的大小:
<html>
<input type="file" name="uploadfiles" onchange="ShowSize(this.value)"> <span ;
}
//-->
</script>
</html>
<input type="file" name="uploadfiles" onchange="ShowSize(this.value)"> <span ;
}
//-->
</script>
</html>