本教程操作环境:windows7系统、javascript1.8.5版,DELL G3电脑。 javascript实现页面跳转的方法: 1、在当前页面打开新页面 通过修改窗体对象window的地址链接属性location.href实现在当前页面打开新页面,即 < language="java" type="text/java"> window.location.href="http://110.html"; </> 2、实现在新窗口打开新页面 可以通过调用窗体对象window的open()方法实现。 即:window.open('http://hx110.com'); 3、返回上一页的跳转 < language="java">
alert("返回");
window.history.back(-1);
</>4、self:当前窗口对象(如果是在iframe里,则为该框架的窗口对象) < language="Java"> self.location='top.html'; </> 5、弹出提示框跳转到其他页面 < language="java">
<!--
function logout()...{
alert("你确定要注销身份吗?");
window.location.href="http://110.html"
}
|















