JS动态设置frame的src(通过URL参数设置) 刚刚接错帖子了,现在在开~
http://jackiekxf.host.yt67.com/frame.aspx?fid=12
<frameset border="0" name="content" framespacing="0" frameborder="0" cols="150,*"> <frame id="leftmenu" name="leftmenu" marginwidth="0" marginheight="0" src="forumlist.aspx" noresize> <frame id="main" name="main"></frameset><noframes></noframes><script language="javascript"> function queryString(sParam){ var sBase = window.location.search var re = eval("/" + sParam + "=([^&]*)/") if (re.test(sBase)){ return RegExp.$1 } else{ return null } } var fid1 = queryString("fid") var oFrm=document.getElementById("main"); if(fid1 != null){ oFrm.src="showforum-"+fid1+".aspx"; } else{ oFrm.src = "focuslist.aspx"; } </script>