当前位置: 代码迷 >> Web前端 >> 脚本搜集
  详细解决方案

脚本搜集

热度:280   发布时间:2013-08-29 10:33:01.0
脚本收集
<html><head>
<script language="javascript">
var timeOut;
function window_onload()
{
timeOut=setTimeout("navigator('http://www.sinr.com')",10000)
}
function window_onmousemove()
{
clearTimeout(timeOut);
}
</script>
</head>
<body onmousemove="return window_onmousemove()" onload="return window_onload

()">
</body>
</html>


<table>
<tr>
<td>
标记实例
</td>
<td><a href="www.tust.edu.cn">天津科技大学</a>
</td>
</tr>
</table>
<hr>
<h3>该文档使用的标记如下</h3>
<script language="javascript">
var i,cell;
for(i=0;i<document.all.length;i++)
{
cell = document.all[i];
if(i>0)
document.write(,);
document.write(cell.tagName);
}
</script>



<html>
<head><title>document对象属性的测试</title></head>
<body>
<a href="http://www.tust.edu.cn">天津科技大学</a>
<image border="0" src="p1010111.jpg" width="200" height="400">
<a href="www.taipyang.com">太平洋电脑城</a>
<hr>
<script language="javascript">
document.write("当前文档的标题:"+document.title+"<br>");
document.write("当前文档的URL:"+document.URL+"<br>");
document.write("当前文档的背景色:"+document.bgColor+"<br>");
document.write("当前文档的最后修改日期:"+document.lastModified+"<br>");
document.write("文档中包含"+document.links.length+"个链接<br>");
document.write("文档中包含"+document.images.length+"个图片<br>");
</script>
</body>
</html>



<html>
<head><title>openwindow</title></head>
<script language="javascript">
var newwin;
function opennewwin()
{
newwin=open

("http://www.sud.cn","mywindow","height=200,width=400,top=100,left=150,resizab

le=yes");
}
function closenewwin()
{
if(newwin!=null)
{
newwin.close();
newwin=null;
}
}
</script>
<body>
<p><a href="javascript:opennewwin()">重新打开窗口</a></p>
<p><a href="javascript:closenewwin()">关闭新窗口</a></p>
<p><a href="javascript:close()">关闭本窗口</a></p>
</body>
</html>


<html>
<head><title>显示所有标记</title>
<script language="javascript">
function showTime()
{
var now,clock_time,time_txt;
now = new Date();
time_txt = now.getHours()+":"+now.getMinutes()+":"+now.getSeconds();
clock_time=document.all("clock");
clock_time.innerText=time_txt;
setTimeout("showTime()",200);
}
</script>
</head>
<body onload="showTime()">
<p id="clock">此处将显示电子时钟的时间</p>



</body>
</html>
  相关解决方案