为了使在iframe change中加载此内容的页面加载一个新的url,此代码中需要更改哪些内容?
好的,这是我的密码为了使在iframe change中加载此内容的页面加载一个新的url,此代码中需要更改哪些内容?,iframe,cookies,parent,Iframe,Cookies,Parent,好的,这是我的密码 <html> <head> <title></title> <body> <script> <!-- /* Cookie Redirect. Written by PerlScriptsJavaScripts.com Copyright http://www.perlscriptsjavascripts.com Free and commercial Perl and JavaScripts
<html>
<head>
<title></title>
<body>
<script>
<!--
/*
Cookie Redirect. Written by PerlScriptsJavaScripts.com
Copyright http://www.perlscriptsjavascripts.com
Free and commercial Perl and JavaScripts
*/
// page to go to if cookie exists
go_to = "http://www.cookieisthere.com";
// number of days cookie lives for
num_days = 365;
function ged(noDays){
var today = new Date();
var expr = new Date(today.getTime() + noDays*24*60*60*1000);
return expr.toGMTString();
}
function readCookie(cookieName){
var start = document.cookie.indexOf(cookieName);
if (start == -1){
} else {
window.location = go_to;
}
}
readCookie("seenit");
// -->
</script>
</body>
</html>
此页面将通过iframe加载到页面上。。。如果cookie是它们的,我希望父窗口转到原始页面,而不是原始页面。在读了一点之后,有些人说在链接的地方使用top,但我不知道怎么做。非常感谢所有帮助:)试试这个
<html>
<head>
<title></title>
<body>
<script>
<!--
/*
Cookie Redirect. Written by PerlScriptsJavaScripts.com
Copyright http://www.perlscriptsjavascripts.com
Free and commercial Perl and JavaScripts
*/
// page to go to if cookie exists
go_to = "http://www.cookieisthere.com";
// number of days cookie lives for
num_days = 365;
function ged(noDays){
var today = new Date();
var expr = new Date(today.getTime() + noDays*24*60*60*1000);
return expr.toGMTString();
}
function readCookie(cookieName){
var start = document.cookie.indexOf(cookieName);
if (start == -1){
} else {
window.top.location = go_to;
}
}
readCookie("seenit");
// -->
</script>
</body>
</html>
我的意思是Cookieiisthere.com会在父窗口中打开。。。我在哪里添加顶级代码?使用我给你的新代码。它应该在顶部。这就是我所改变的