如何隐藏和显示按钮我已尝试隐藏但不显示第二个按钮
function mybutton1() {
document.getElementById('<%=Button1.ClientID%>').style.display = "none";
}
function mybutton2() {
document.getElementById('<%=Button2.ClientID %>').style.display = "block";
}
答案 0 :(得分:-1)
你想这样做
function mybutton1() {
document.getElementById('Button1').style.display = "none";
}
function mybutton2() {
document.getElementById('Button1').style.display = "block";
}
<table>
<tr>
<td>
<input type="button" name="button1" value="button1" id="Button1" onclick="mybutton1();">
</td>
<td>
<input type="button" name="button2" value="button2" id="Button2" onclick="mybutton2();">
</td>
</tr>
</table>