我想在按钮下面显示一个名为“laila”的隐藏div 这是我的代码:
<html>
Disable dates before:<input type="text"><input style="width:20;height:25" type="button" value="myButton" onclick="show()">
<script>
function show(){
document.getElementById("laila").style.display="block";
}
</script>
<div id ="laila" style="display: none"><table border="1"><tr><td>laila</td></tr></table></div>
</html>
如何将div放在“myButton”下?
答案 0 :(得分:0)
<script>
function show() {
document.getElementById("laila").style.display = "block";
}
</script>
<div>
<table>
<tr>
<td>
Disable dates before:
</td>
<td>
<input type="text"><input style="width: 20; height: 25" type="button" value="myButton"
onclick="show()">
</td>
</tr>
<tr id="laila" style="display: none">
<td>
</td>
<td>
laila
</td>
</tr>
</table>
</div>