try
---------------------------
document.frames["mainFrame"].src="home.asp?type=" + QueryString("type");ordocument.frames["mainFrame"].document.location="home.asp?type=" + QueryString("type");
---------------------------
document.frames["mainFrame"].src="home.asp?type=" + QueryString("type");ordocument.frames["mainFrame"].document.location="home.asp?type=" + QueryString("type");
<script>
function QueryString(item)
{
var sValue=location.search.match(new RegExp("[\?\&]"+item+"=([^\&]*)(\&?)","i"))
return sValue?sValue[1]:sValue
}
alert(QueryString("type"));
</script> <html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset rows="100,*" cols="*" framespacing="1" frameborder="yes" border="0.1" bordercolor="#CCCCCC">
<frame src="top.asp" name="topFrame" frameborder="no" scrolling="NO" noresize >
<frameset rows="*" cols="180,*" framespacing="0" frameborder="no" border="0" bordercolor="#CCCCCC">
<frame src="tree.asp" name="leftFrame" frameborder="no" border="0">
<frame src="" name="mainFrame" frameborder="no" noresize>
<script>
document.frames["mainFrame"].document.location="home.asp?type=" + QueryString("type");
</script>
</frameset>
</frameset></html>
----------------------------------------------
<script language="javascript">
function QueryString(item)
{
var sValue=location.search.match(new RegExp("[\?\&]"+item+"=([^\&]*)(\&?)","i"))
return sValue?sValue[1]:sValue
}
window.onload=function(){
document.frames["mainFrame"].document.location="home.asp?type=" + QueryString("type");
}
</script>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset rows="100,*" frameborder="0">
<frame name="topFrame" scrolling="no" noresize scrolling="no" src="top.asp">
<frameset cols="180,*" frameborder="0">
<frame name="leftFrame" target="mainFrame" src="tree.asp">
<frame name="mainFrame" src="home.asp">
</frameset>
<noframes>
<body>
<p>此网页使用了框架,但您的浏览器不支持框架。</p> </body>
</noframes>
</frameset></html>
document.frames["mainFrame"].document.location="home.asp?type=" + QueryString("type");
后,页面是定向过去了,单是前面所说的刷新的问题又回来了,这样的话我用html就没意义了leohuang(LEO)大哥,这个问题有办法解决吗?
<HTML><HEAD>
<script>
function setCookie(cookieName, cookieValue, expires, path, domain, secure)
{
document.cookie =
escape(cookieName) + '=' + escape(cookieValue)
+ (expires ? '; expires=' + expires.toGMTString() : '')
+ (path ? '; path=' + path : '')
+ (domain ? '; domain=' + domain : '')
+ (secure ? '; secure' : '');
};function getCookie(cookieName)
{
var cookieValue = '';
var posName = document.cookie.indexOf(escape(cookieName) + '=');
if (posName != -1)
{
var posValue = posName + (escape(cookieName) + '=').length;
var endPos = document.cookie.indexOf(';', posValue);
if (endPos != -1)
{
cookieValue = unescape(document.cookie.substring(posValue, endPos));
}
else
{
cookieValue = unescape(document.cookie.substring(posValue));
}
}
return (cookieValue);
};
function clearCookie()
{
var now = new Date();
var yesterday = new Date(now.getTime() - 1000 * 60 * 60 * 24);
this.setCookie('wuxin', '', yesterday);
this.setCookie('urlGo', '', yesterday);
this.setCookie('message', '', yesterday);
};// [Cookie] Returns ids of open nodes as a string</script>
<SCRIPT FOR=window EVENT=close>
clearCookie();
</SCRIPT>
<SCRIPT FOR=window EVENT=onload >
if(getCookie("wuxin")==""){
leftmenu.location="index.htm";
}
else{
leftmenu.location=getCookie("urlGo");
}
</SCRIPT><TITLE></TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<META content="MSHTML 6.00.2800.1106" name=GENERATOR></HEAD><FRAMESET id=frame1
border=0 frameSpacing=0 rows=*,0 frameBorder=NO cols=*><FRAME
id=leftmenu src="index1.htm"
frameBorder=0 noResize>
</FRAMESET></HTML>
index1.htm:
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META NAME="Generator" CONTENT="EditPlus">
<META NAME="Author" CONTENT="">
<META NAME="Keywords" CONTENT="">
<META NAME="Description" CONTENT="">
</HEAD><BODY>
<form action="checkuser.htm" method="post">
<input type="text" name="text" value="">
<input type="submit" value="提交">
</form>
</BODY>
</HTML>
checkuser.htm:
<HTML><HEAD><TITLE>IAMSS</TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312"><LINK
href="IAMSS.files/styles.css" type=text/css rel=stylesheet>
<STYLE type=text/css>BODY {
BACKGROUND-IMAGE: none
}
.style3 {
FONT-WEIGHT: bold; COLOR: #ffffff; FONT-FAMILY: Verdana
}
</STYLE><SCRIPT>
function setCookie(cookieName, cookieValue, expires, path, domain, secure)
{
document.cookie =
escape(cookieName) + '=' + escape(cookieValue)
+ (expires ? '; expires=' + expires.toGMTString() : '')
+ (path ? '; path=' + path : '')
+ (domain ? '; domain=' + domain : '')
+ (secure ? '; secure' : '');
};
function onload(cook,url){
var wuxin
var urlGo;
if(url!=""){
setCookie('wuxin',cook);
setCookie('urlGo',url);
top.leftmenu.location=url;
}
else{
alert("错误");
history.back();
}
}
</SCRIPT><META content="MSHTML 6.00.2800.1106" name=GENERATOR>
</HEAD><BODY onload="onload('123','main.htm')">
</BODy></html>