<script>
function aa()
{
if (queryString(location.href, "id")=="1")
parent.fram2.document.location.herf="1.asp"
if (queryString(location.href, "id")=="2")
parent.fram2.document.location.herf="1.asp"
}
function queryString(strURL, strParam)
{
var strVal = "";
try
{
// if strURL = "http://www.mySite.com/myPage.htm?param1=val1¶m2=val2"
var nIndex = strURL.indexOf("?");
if (nIndex > 0)
{
// cut strURL into "¶m1=val1¶m2=val2"
strURL = "&" + strURL.substring(nIndex + 1, strURL.length);
nIndex = strURL.indexOf("&"+ strParam + "=");
if(nIndex >= 0)
{
// jump to the position after the equal sign, if we're looking for
// param1, then strURL should contain 'val1¶m2=val2'
strURL = strURL.substring(nIndex + strParam.length + 2, strURL.length);
// in case there are other parameters followed
nIndex = strURL.indexOf("&");
if(nIndex == -1) //find the target
strVal = strURL;
else
strVal = strURL.substring(0, nIndex); // strVal should be 'val1' now
}
}
}
catch(e){}
<%
sub aa()
if request.querystring("id")="1" then
response.write "<scr"&"ipt>parent.fram2.document.location.herf='1.asp'</scr"&"ipt>"
response.end
end if
if request.querystring("id")="2" then
response.write "<scr"&"ipt>parent.fram2.document.location.herf='1.asp'</scr"&"ipt>"
response.end
end if
end sub
sub aa()
if request.querystring("id")="1" then
parent.fram2.document.location.herf="1.asp"
end if
if request.querystring("id")="2" then
parent.fram2.document.location.herf="2.asp"
end if
end sub
这个问题我如何解决,我该怎么写阿,新手才一个角,帮个忙啊!
我的代码:
sub aa()
if request.querystring("id")="1" then
parent.fram2.document.location.herf="1.asp"
end if
if request.querystring("id")="2" then
parent.fram2.document.location.herf="2.asp"
end if
网页打开是现实有错误。
onclick="aa()"