发布于 2017-07-20 12:54:09 | 201 次阅读 | 评论: 0 | 来源: 网友投递

这里有新鲜出炉的Javascript教程,程序狗速度看过来!

JavaScript客户端脚本语言

Javascript 是一种由Netscape的LiveScript发展而来的原型化继承的基于对象的动态类型的区分大小写的客户端脚本语言,主要目的是为了解决服务器端语言,比如Perl,遗留的速度问题,为客户提供更流畅的浏览效果。


本文将介绍下用表格输出1-1000之间的数字同时附有特效,感兴趣的朋友可以参考下哈,希望对你有所帮助
 
<html> 
<head> 
<title> 
</title> 
<script> 
var cc= null; 
function show(obj) 
{ 
cc=obj.style.backgroundColor; 
obj.style.backgroundColor="Red"; 
} 
function disshow(obj) 
{ 
obj.style.backgroundColor=cc; 
} 
</script> 
</head> 
<body> 
<?php 
echo "<table border=1 align=center width=800"; 
echo "<caption><h1>用表格输出1-1000之间的数字</h1></caption>"; 
$i=0; 
$k=1; 
while($i<100) 
{ 
$i++; 
if($i%2==0) 
$bgc="#ccba6e"; 
else 
$bgc="#eefa43"; 
echo "<tr bgcolor='".$bgc."'onmouseover='show(this)' 
onmouseout='disshow(this)' >"; 
$j=0; 
while($j<10) 
{ 
echo "<td>".$k."</td>"; 
$j++; 
$k++; 
} 
echo "</tr>"; 
} 
echo "</table>"; 
?> 
</body> 
</html> 



最新网友评论  共有(0)条评论 发布评论 返回顶部

Copyright © 2007-2017 PHPERZ.COM All Rights Reserved   冀ICP备14009818号  版权声明  广告服务