The JS control table implements a method for splitting lines of light flow

  • 2020-05-12 02:10:20
  • OfStack

In this paper, an example is given to realize the separation of a ray flow in an JS control table. Share with you for your reference. The specific analysis is as follows:

This is a nice one-line split code.
In fact, it is a 7-color streamer segmentation horizontal line realized by JS control table

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>js Implemented in cells 7 The color line </title>
</head>
<body>
<script>
l=Array(6,7,8,9,'a','b','b','c','d','e','f')
t="<table height=4 width=100% cellspacing=0 cellpadding=0><tr>"
for(x=0;x<40;x++){t+="<td id=a_mo"+x+"></td>"}
document.write(t+"</tr></table>")
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>
</body>
</html>

I hope this article has been helpful to your javascript programming.


Related articles: