程序员人生 网站导航

JavaScript:跳转页面的几个方法

栏目:jscript时间:2014-02-13 11:13:27

  网(LieHuo.Net)教程 页面跳转是一种常见的网页形式,由于我们在网站的运营中经常遇到网站改版或变更地址,则需要跳转到新的网页当中,这时候怎么办呢?在以前的文章中,我们说到asp/html/php等跳转的方法,今天再来说一下javascript的几种跳转页面形式,代码如下:

document.URL = 'http://www.wfuyu.com;
window.location = 'http://www.wfuyu.com';
window.location.href = 'http://www.wfuyu.com';
window.location.assign('http://www.wfuyu.com');
window.location.replace('http://www.wfuyu.com');
------分隔线----------------------------
------分隔线----------------------------

最新技术推荐