JavaScript automatically transforms table border colors

  • 2020-06-12 08:24:44
  • OfStack

The code is as follows. Save to the HTML file to see the effect:


<html>
<head>
<meta charset="utf-8">
<title> Table border transform color code </title>
</head>
<body>
<table border="0" width="261" id="change_jb51_net" style="border:1px solid red">
<tr>
<td> Wait and see if the border has changed color ?</td>
</tr>
</table>
<script>
<!--
function hovertreecolor(){

if (change_jb51_net.style.borderColor=="blue")
change_jb51_net.style.borderColor="red"
else
change_jb51_net.style.borderColor="blue"
}
setInterval("hovertreecolor()", 3000)
</script>
</body>
</html>

This is the end of this article, I hope you enjoy it.


Related articles: