This article mainly introduces how to implement a line separation by Ray flow in the JS control table. The example shows how to use javascript to operate table elements, for more information about how to use the JS control table to separate lines of light flow, see the following example. Share it with you for your reference. The specific analysis is as follows:
This is a beautiful code for splitting lines.
In fact, it is a colorful traffic separation line implemented by using the JS control table.
The code is as follows:
7-color lines implemented by js using cells
Script
L = Array (6, 7, 8, 9, 'A', 'B', 'B', 'C', 'D', 'e', 'F ')
T ="
"For (x = 0; x <40; x ++) {t + ="
| "} Document. write (t +"
")
Function f1 (y) {for (I = 0; I <40; I ++) {c = (I + y) % 20; if (c> 10) c = 20-c
Document. all ["a_mo" + (I)]. bgColor = "'#00" + l [c] + l [c] + "00'"} y ++
SetTimeout ('F1 ('+ y +') ', 1)} f1 (1)
Script
I hope this article will help you design javascript programs.