【发布时间】:2015-12-09 07:44:54
【问题描述】:
我已经创建了以下代码
<script>
function show()
{
document.getElementById("changetable").style.display = "initial";
}
</script>
<script>
function hide()
{
document.getElementById("changetable").style.display = "none";
}
</script>
<select>
<option onclick="hide()">1</option>
<option onclick="hide()">2</option>
<option onclick="hide()">3</option>
</select>
<input name="convert" id="submitbutton" type="button" value="Convert" size="10" onclick="return show();"/>
<div id="changetable" style="display:none" align="center">
<table width="526" height="140" border="0" cellpadding="1" cellspacing="3">
<tr>
<th>
name:
</th>
<td>
<input name="fname" type="text" />
</td>
</tr>
</table>
</div>
一切正常,除非我使用谷歌浏览器显示它。该表已显示,但在我单击选项值后无法隐藏。 Mozilla 和其他人完全可以正常工作。有什么想法吗?
【问题讨论】:
-
你没有关闭
div#changetable -
我做了,抱歉忘了补充
-
复制粘贴测试代码的时候怎么引入这么多bug?
-
@sevenseacat 忽略小错误,我更改了一些原始代码。回到原来的问题。
标签: javascript html