Home  >  Article  >  Web Front-end  >  JS control table method to realize a light flow to separate rows_javascript skills

JS control table method to realize a light flow to separate rows_javascript skills

WBOY
WBOYOriginal
2016-05-16 16:10:371333browse

The example in this article describes the method of JS controlling the table to realize a line of light flow to divide the rows. Share it with everyone for your reference. The specific analysis is as follows:

This is a nice split line of code.
In fact, it is a colorful streamer dividing horizontal line realized by using JS control table

Copy code The code is as follows:



JS uses cells to realize colorful lines


<script><br> l=Array(6,7,8,9,'a','b','b','c','d','e','f')<br> t="<table height=4 width=100% cellspacing=0 cellpadding=0><tr>"<br> for(x=0;x<40;x ){t ="<td id=a_mo" x "></td>"}<br> document.write(t "</tr></table>")<br> function f1(y){for(i=0;i<40;i ){c=(i y) ;if(c>10)c=20-c<br> document.all["a_mo" (i)].bgColor="'#00" l[c] l[c] "00'"}y <br> setTimeout('f1(' y ')',1)}f1(1)<br> </script>

I hope this article will be helpful to everyone’s JavaScript programming design.

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