/
color.js
153 lines (142 loc) · 2.66 KB
/
color.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<script type="text/javascript">
var a1=1;
var a2=1;
var a3=1;
var a4=1;
var a5=1;
var a6=1;
var a7=1;
var a8=1;
var a9=1;
var a10=1;
function color1(x) {
//var a=1;
if(a1==1)
{
x.style.background="orange";
return a1++;
}
if(a1==2)
{
x.style.background="#ccc";
a1=a1-1;
}
}
function color2(x) {
//var a=1;
if(a2==1)
{
x.style.background="orange";
return a2++;
}
if(a2==2)
{
x.style.background="#ccc";
a2=a2-1;
}
}
function color3(x) {
//var a=1;
if(a3==1)
{
x.style.background="orange";
return a3++;
}
if(a3==2)
{
x.style.background="#ccc";
a3=a3-1;
}
}
function color4(x) {
//var a=1;
if(a4==1)
{
x.style.background="orange";
return a4++;
}
if(a4==2)
{
x.style.background="#ccc";
a4=--;
}
}
function color5(x) {
//var a=1;
if(a5==1)
{
x.style.background="orange";
return a5++;
}
if(a5==2)
{
x.style.background="#ccc";
a5=--;
}
}
function color6(x) {
//var a=1;
if(a6==1)
{
x.style.background="orange";
return a6++;
}
if(a6==2)
{
x.style.background="#ccc";
a6=--;
}
}
function color7(x) {
//var a=1;
if(a7==1)
{
x.style.background="orange";
return a7++;
}
if(a7==2)
{
x.style.background="#ccc";
a7=--;
}
}
function color8(x) {
//var a=1;
if(a8==1)
{
x.style.background="orange";
return a8++;
}
if(a8==2)
{
x.style.background="#ccc";
a8=--;
}
}
function color9(x) {
//var a=1;
if(a9==1)
{
x.style.background="orange";
return a9++;
}
if(a9==2)
{
x.style.background="#ccc";
a9=--;
}
}
function color10(x) {
//var a=1;
if(a4==1)
{
x.style.background="orange";
return a10++;
}
if(a10==2)
{
x.style.background="#ccc";
a10=--;
}
}
</script>