javaScript简单的表格边框闪烁效果。
貌似CSDN里的都是专业人士,高手可以掠过了,呵呵。
一下是源码:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<body>
<script language="javascript">
i=0
var c=new Array(3)
c[0]="red"
c[1]="yellow"
c[2]="blue"
c[3]="pink"
c[4]="black"
c[5]="white"
c[6]="green"
function flash(){
a.style.borderColor=c[i]
i++
if(i>6)
i=0;
setTimeout("flash()",500)
}
</script>
<table width="392" height="240" border="5" id="a" >
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
<script language="javascript">flash()</script>
</body>
</html>
相关文档:
// 学习要想拷贝那么快就好了
//
// JavaScript 的继承是基于 prototype 的,每个对象的 prototype 是保存在对象的 __proto__ 属性中的,这个属性是内部(internal)的属性( 惯例是内部的或者隐藏的属性以 _ 开头)
// A prototype-based language has the notion of a prototypical object, an object used as a template ......
<script language="javascript" type="text/javascript">
// <!CDATA[
function Test()
{
document.location.href = 'test. ......
在 document 对象中有一个 cookie 属性。但是 Cookie 又是什么?“某些 Web 站点在您的硬盘上用很小的文本文件存储了一些信息,这些文件就称为 Cookie。”—— MSIE 帮助。一般来说,Cookies 是 CGI 或类似,比 HTML 高级的文件、程序等创建的,但是 JavaScript 也提供了对 Cookies 的很全面的访问权利 ......
with(document)
{
write ("test");
write
("dsasfda");
}
上面是用了with
如果不用的话就要这样写了
document.write (" ......