<script language=JavaScript>
function changeshow(){
document.getElementById("imim").style.display="none";
}
</script>
<img src="images/button.gif" onclick="changeshow()";>
<img id=imim src="images/index.gif" width="227" height="107">
function changeshow(){
document.getElementById("imim").style.display="none";
}
</script>
<img src="images/button.gif" onclick="changeshow()";>
<img id=imim src="images/index.gif" width="227" height="107">
改了一下代码,发现又有新的问题:
<script language=JavaScript>
function changeshow(){
if(document.getElementById("imim").style.display=="none")
document.getElementById("imim").style.display="block";
else
document.getElementById("imim").style.display="none";
}
</script>
<table border="1">
<tr>
<td onclick="changeshow()";>click</td>
</tr>
<tr id=imim>
<td><img src="images/index_05.gif" width="227" height="107"></td>
</tr>
<tr>
<td><img src="images/index_02.gif" width="287" height="132" ></td>
</tr>
</table>
还是老问题,ie里imim点击隐藏后再点击就会出来,但netscape里面点击隐藏再点击就怎么都出不来了...-_-...
function changeshow(){
if(document.getElementById("imim").style.visibility=="hidden")
document.getElementById("imim").style.visibility="visible";
else
document.getElementById("imim").style.visibility="hidden";
}
</script>
<table border="1">
<tr>
<td onclick="changeshow()";>click</td>
</tr>
<tr id=imim>
<td><img src="images/index_05.gif" width="227" height="107"></td>
</tr>
<tr>
<td><img src="images/index_02.gif" width="287" height="132" ></td>
</tr>
</table>
我想用display,因为他它会连空间也缩回去的.谢谢wangxiaomax(缺省值) 真的没办法了么...
function changeshow(){
document.getElementById("imim").style.display="none";
}
</script>
<img src="images/button.gif" onclick="changeshow()";>
<img id=imim src="images/index.gif" width="227" height="107">
<script language=JavaScript>
function changeshow(){
if(document.getElementById("imim").style.display=="none")
document.getElementById("imim").style.display="block";
else
document.getElementById("imim").style.display="none";
}
</script>
<table border="1">
<tr>
<td onclick="changeshow()";>click</td>
</tr>
<tr >
<td><img id=imim src="images/Js_ico1.gif" width="227" height="107"></td>
</tr>
<tr>
<td><img src="images/Js_ico2.gif" width="287" height="132" ></td>
</tr>
</table>