window.location用來返回頁面的地址,並把頁面重定向新的頁面;
location.pathname:返回當前的頁面地址和文件名
location.hostname:主機名
location.port:主機的端口號
location.protocol:返回所使用的web協議(http://和https://)
location.href:返回當前頁面的地址;
location.assign():加載一個新的文檔
window.location用來返回頁面的地址,並把頁面重定向新的頁面;
location.pathname:返回當前的頁面地址和文件名
location.hostname:主機名
location.port:主機的端口號
location.protocol:返回所使用的web協議(http://和https://)
location.href:返回當前頁面的地址;
location.assign():加載一個新的文檔
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。