Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>Flash Table Border and/or Text Color</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<table border="0" width="280" id="myexample" style="border:5px solid green">
<tr>
<td>Insert anything you want into this table.<br>Insert anything you want into this table.<br>Insert anything you want into this table.<br></td>
</tr>
</table>
<script type="text/javascript">
/*
Flashing Table Border &/or Text Script- © Dynamic Drive (www.dynamicdrive.com)
Visit http://www.dynamicdrive.com for this script
Credit must stay intact for use
Modified in DD Forums by jscheuer1
http://www.dynamicdrive.com/forums
*/
//configure interval btw flash (1000=1 second)
var speed=500
var startColor='green'
var changeColor='red'
rotate=2 //Set to 1 (border only), 2 (text only), or 3 (border & text).
//////////////////Stop Editing///////////////////
var baseColor=startColor
function flashit(){
var crosstable=document.getElementById? document.getElementById("myexample") : document.all? document.all.myexample : ""
if (crosstable){
if (startColor==baseColor){
if (rotate==1||rotate==3)
crosstable.style.borderColor=changeColor
if (rotate==2||rotate==3)
crosstable.style.color=changeColor
startColor=''
}
else{
if (rotate==1||rotate==3)
crosstable.style.borderColor=baseColor
if (rotate==2||rotate==3)
crosstable.style.color=baseColor
startColor='green'
}
}
}
setInterval("flashit()", speed)
</script>
</body>
</html>
Bookmarks