前台页面跳转方式:
1、带frame的跳转
a window.frames.frameName.location.href= url; //frameName代表某个frame,url代表跳转的路径。
b 打开一个新窗口,window.open(url,'frameName');
2、不带frame的跳转
a window.location.href=url;
b window.history.back(-1);//后退
c window.history.go(-1||-2||...);//后退到前一||二||。。。页面
d window.navigate(url);
e self.location = url;
f top.location = url;
g window.location.reload();//刷新当前页面
h parent.location.reload();//刷新父亲对象页面
i opener.location.reload();//刷新父窗口页面
1、带frame的跳转
a window.frames.frameName.location.href= url; //frameName代表某个frame,url代表跳转的路径。
b 打开一个新窗口,window.open(url,'frameName');
2、不带frame的跳转
a window.location.href=url;
b window.history.back(-1);//后退
c window.history.go(-1||-2||...);//后退到前一||二||。。。页面
d window.navigate(url);
e self.location = url;
f top.location = url;
g window.location.reload();//刷新当前页面
h parent.location.reload();//刷新父亲对象页面
i opener.location.reload();//刷新父窗口页面
本文总结了多种网页跳转的方法,包括带frame和不带frame的跳转方式,如使用window.location.href、window.open等进行页面跳转及刷新的具体实现。
628

被折叠的 条评论
为什么被折叠?



