编辑: 由于这个问题变得相当受欢迎,我将修复问题以使其成为可工作的代码示例。原始问题仍然列出,但代码是有效的。
我正在尝试在按下按钮后显示一个div,但这无法正常工作,有什么想法吗?
<form action="insert.php" method="POST" align="right" id="post_form">
<input type="button" value="click me" onClick="show()">
<div id="show_button"> fdsfds </div><br>
</form>
#show_button{
visibility:hidden;
}
function show(){
// alert("cheked the button - worked");
document.getElementById("show_button").style.visibility= 'visible' ;
}
document.getElementById("show_button")
。 - Antony