轉(zhuǎn)載鏈接 js頁(yè)面跳轉(zhuǎn)大全
常規(guī)的js頁(yè)面跳轉(zhuǎn)代碼
1. 在原來(lái)的窗體中跳轉(zhuǎn)
window.location.href = "url";
2. 在新窗體中打開(kāi)頁(yè)面
window.open("url");
3. js頁(yè)面跳轉(zhuǎn)設(shè)置參數(shù)
window.open ('page.html', 'newwindow', 'height=100, width=400, top=0,left=0, toolbar=no, menubar=no, scrollbars=no, resizable=no,location=no, status=no')
window.open 彈出新窗口的命令荧缘;
'page.html' 彈出窗口的文件名;
'newwindow' 彈出窗口的名字(不是文件名)际邻,非必須潘悼,可用空'代替液南;
height=100 窗口高度焰盗;
width=500 窗口寬度屠凶;
top=0 窗口距離屏幕上方的象素值遮咖;
left=0 窗口距離屏幕左側(cè)的象素值腻窒。
4. 返回上一頁(yè)面
window.history.back(-1);