Home >
front end > How to select button by a, and then choose another button assigned to button a?
How to select button by a, and then choose another button assigned to button a?
<meta charset="utf-8"/& gt;
Sudoku & lt;/title>
<style type="text/CSS" & gt;
* {
margin: 0;
padding: 0;
}
Button: hover {
background-color: red;
}
# test {
background-color: red;
Width: 156 px;
/* width: 100%; */
}
The geZi {
border: 1px solid red;
float: left;
Width: 50 px;
Height: 50 px;
Background - color: greenyellow;
text-align: center;
line-height: 50px;
}
The input {
The clear: left;
}
. GeZi1 {
border: 1px solid red;
float: left;
Width: 20 px;
Height: 20 px;
Background - color: greenyellow;
text-align: center;
The line - height: 20 px;
}
</style>
<body>
,1,3 var suzi=[[2], [4,6,5], [7,8,9]].
Var a0=document. GetElementById (' a0);
Var a1=document. GetElementById (" a1 ");
Var a2=document. GetElementById (' a2 ');
Var a3=document. GetElementById (" a3 ");
Var a4=document. GetElementById (" a4 ");
Var a5=document. GetElementById (" a5 ");
Var a6=document. GetElementById (' a6);
Var a7=document. GetElementById (' a7);
Var a8=document. GetElementById (' a8);
A0. InnerHTML=suzi [0] [0];
A1. InnerHTML=suzi [0] [1].
A2. InnerHTML=suzi [0] [2].
A3. InnerHTML=suzi [1] [0].
A4. InnerHTML=suzi [1] [1].
A5. InnerHTML=suzi [1] [2].
A6. InnerHTML=suzi [2] [0].
A7. InnerHTML=suzi [2] [1].
A8. InnerHTML=suzi [2] [2].
Var mm;
The function jiSuan (obj) {
Document. The getElementById (obj. Id). InnerHTML=mm;
}
The function fuZhi (obj) {
Var qq=document. GetElementById (obj. Id);
Alert (qq);
}
</script>