Home  >  Article  >  Web Front-end  >  JavaScript implements automatic change of table border color_javascript skills

JavaScript implements automatic change of table border color_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:00:061062browse

The code is as follows, you can also view the effect by saving it to an HTML file:

<html>
<head>
<meta charset="utf-8">
<title>表格边框变换颜色代码</title>
</head>
<body>
<table border="0" width="261" id="change_jb51_net" style="border:1px solid red">
<tr>
<td>等待,然后注意看边框是不是变色了&#63;</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>

The above is the entire content of this article, I hope you all like it.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn