摘要:
ie不支持getElementsByClassName,所以要自己实现获取类名为className的所有元素。<html><head><script type="text/javascript">window.onload = function(){ var topMenus = getClass('li','topMenu'); for(var i=0;i < topMenus.length; i++) { alert(topMenus[i].innerHTML); }}function getCl 阅读全文
摘要:
左侧有个菜单,右侧有个iFrame,然后可以隐藏与显示左侧的菜单。1,下面是js代码:<script type="text/javascript" >function HideShow(){var alt=document.getElementById('switchPoint').alt;var src=document.getElementById('switchPoint').src; if(alt=='隐藏') { document.getElementById('switchPoint') 阅读全文