求一主流浏览器都能用的显示/隐藏层的方法,最好有源程序。 <DIV style="DISPLAY: none〉</DIV> 不显示<DIV style="DISPLAY:其它值"></div>都显示 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 <script language="JavaScript"> function openDiv(divName,mapName){ divName.style.display = ''; document.getElementById(mapName).src='../images/arrow_up_big.gif'; } function closeDiv(divName,mapName){ divName.style.display = 'none'; document.getElementById(mapName).src='../images/arrow_down_big.gif'; } function switchDiv(oneDivName,map1,twoDivName,map2,threeDivName,map3) { if(oneDivName.style.display == '') { closeDiv(oneDivName,map1); } else { closeDiv(twoDivName,map2); closeDiv(threeDivName,map3); openDiv(oneDivName,map1); } }</script><div class="icon">关键字查询<a href="#" onClick="javascript:switchDiv(key,'keyMap',com,'comMap',cat,'catMap')"><img id="KeyMap" src="../images/arrow_down_big.gif" width="19" height="13" border="0"></a> 组合查询<a href="#" onClick="switchDiv(com,'comMap',key,'keyMap',cat,'catMap')"><img id="comMap" src="../images/arrow_down_big.gif" width="19" height="13" border="0"></a> 全文检索<a href="#" onClick="switchDiv(cat,'catMap',com,'comMap',key,'keyMap')"><img id="catMap" src="../images/arrow_down_big.gif" width="19" height="13" border="0"></a> </div><p> <div style="display:none" id="key"> <table border="0" width="100%"> <tr> <td width="73%" align="right" class="ccLabel">请输入要查询的关键字:<input type="text" size="50"></td> <td width="27%"><input type="button" value="查询" class="ccIcon"></td> </tr> <tr> <td colspan="2" align="center"><font color="#FF0000">可以填写多个关键字,使用and、or、not连接</font></td> </tr> </table> <div class="ccLabel" align="center">在本目录下查询<input type=checkbox unchecked> </div></div> <div style="display:none" id="com"> <div align="center" class="ccLabel">资源编号:<input type="text" class="red">资源名称: <input type="text" class="red"></div> <div align="center" class="ccLabel"> 关键字:<input type="text" class="red" size="54"></div> <div align="center" class="ccLabel">格式:<input type="text" class="red">作者:<input type="text" class="red"></div> <br> <br> <div align="center"><input type="button" class="ccIcon" value="查询"> <input type="button" class="ccIcon" value="重设"></div><br> <div class="ccLabel" align="center">在本目录下查询<input type=checkbox unchecked> </div></div><div style="display:none" id="cat"> <div align="center" class="ccLabel">请输入全文检索的关键字:<input type=text></div><br><br> <div align="center"><input type=submit value="搜索" class="ccIcon"></div></div> 谢谢两位的解答我的意思是说要各种浏览器都能用的比如IE,Netscape,Mozillo等越多越好 <input type=button value="Block" onclick="oSpan.style.display='block'"><input type=button value="None" onclick="oSpan.style.display='none'"><SPAN id="oSpan" style="display:none;">灰豆宝宝.net</SPAN> 又是一个基础性问题,头大了。 IE不支持toSource(),有替代函数吗 球MSSQL2005一个循环语句的写法 求正则表达式,只允许输入英文和空格,谢谢 请熟悉Jquery的朋友帮忙修改一段代码 火狐ff中遍历某一个form下面所有的input控件,如何写这个js ? 判断checkbox是否被选中 问一个js语法的问题。 有关屏蔽ie浏览器右上角的那个关闭按钮的方法 JQuery 一个特效问题,哪位大神帮我解释下,一下代码的意思 怎么实现这样的table效果???请指教 有人用javascript做过网站的计数器吗?急
function openDiv(divName,mapName){
divName.style.display = '';
document.getElementById(mapName).src='../images/arrow_up_big.gif';
} function closeDiv(divName,mapName){
divName.style.display = 'none';
document.getElementById(mapName).src='../images/arrow_down_big.gif';
} function switchDiv(oneDivName,map1,twoDivName,map2,threeDivName,map3) {
if(oneDivName.style.display == '') {
closeDiv(oneDivName,map1);
} else {
closeDiv(twoDivName,map2);
closeDiv(threeDivName,map3);
openDiv(oneDivName,map1);
}
}
</script>
<div class="icon">关键字查询<a href="#" onClick="javascript:switchDiv(key,'keyMap',com,'comMap',cat,'catMap')"><img id="KeyMap" src="../images/arrow_down_big.gif" width="19" height="13" border="0"></a> 组合查询<a href="#" onClick="switchDiv(com,'comMap',key,'keyMap',cat,'catMap')"><img id="comMap" src="../images/arrow_down_big.gif" width="19" height="13" border="0"></a> 全文检索<a href="#" onClick="switchDiv(cat,'catMap',com,'comMap',key,'keyMap')"><img id="catMap" src="../images/arrow_down_big.gif" width="19" height="13" border="0"></a> </div>
<p>
<div style="display:none" id="key">
<table border="0" width="100%">
<tr>
<td width="73%" align="right" class="ccLabel">请输入要查询的关键字:<input type="text" size="50"></td>
<td width="27%"><input type="button" value="查询" class="ccIcon"></td>
</tr>
<tr>
<td colspan="2" align="center"><font color="#FF0000">可以填写多个关键字,使用and、or、not连接</font></td>
</tr>
</table>
<div class="ccLabel" align="center">在本目录下查询<input type=checkbox unchecked> </div></div>
<div style="display:none" id="com">
<div align="center" class="ccLabel">资源编号:<input type="text" class="red">资源名称: <input type="text" class="red"></div>
<div align="center" class="ccLabel"> 关键字:<input type="text" class="red" size="54"></div>
<div align="center" class="ccLabel">格式:<input type="text" class="red">作者:<input type="text" class="red"></div>
<br>
<br>
<div align="center"><input type="button" class="ccIcon" value="查询"> <input type="button" class="ccIcon" value="重设"></div><br>
<div class="ccLabel" align="center">在本目录下查询<input type=checkbox unchecked> </div>
</div><div style="display:none" id="cat">
<div align="center" class="ccLabel">请输入全文检索的关键字:<input type=text></div><br><br>
<div align="center"><input type=submit value="搜索" class="ccIcon"></div>
</div>
<input type=button value="None" onclick="oSpan.style.display='none'">
<SPAN id="oSpan" style="display:none;">灰豆宝宝.net</SPAN>