
JavaScript中实现页面跳转的方法:
使用函数实现在原来的窗体中直接跳转的方法:
<script type="text/javascript">
function redrect()
{
window.location.href="你所要跳转的页面";
}
</script>使用函数实现在新窗体中打开页面的方法:
<script type="text/javascript">
function redrect()
{
window.open('你所要跳转的页面');
}
</script>JavaScript直接跳转加参数:
<SCRIPT LANGUAGE="javascript">
<!--
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')
//写成一行
-->
</SCRIPT>参数解释:
<SCRIPT LANGUAGE="javascript"> js脚本开始;
window.open 弹出新窗口的命令;
'page.html' 弹出窗口的文件名;
'newwindow' 弹出窗口的名字(不是文件名),非必须,可用空'代替;
height=100 窗口高度;
width=500 窗口宽度;
top=0 窗口距离屏幕上方的象素值;
left=0 窗口距离屏幕左侧的象素值。
以上就是javascript函数里如何实现页面跳转?的详细内容,更多请关注易知道|edz.cc其它相关文章!














