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

JavaScript implements automatic change of table border color_javascript skills

WBOY
Release: 2016-05-16 16:00:06
Original
1084 people have browsed it

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>
Copy after login

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

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template