JS window.open()方法
2017-06-30 15:09
211 查看
open() 方法可以查找一个已经存在或者新建的浏览器窗口。
语法:
语法:
window.open(
参数表:
[url=http://img.mukewang.com/52e3677900013d6a05020261.jpg]
" target=_blank>, [窗口名称], [参数字符串])[/code]
参数说明:URL:可选参数,在窗口中要显示网页的网址或路径。如果省略这个参数,或者它的值是空字符串,那么窗口就不显示任何文档。 窗口名称:可选参数,被打开窗口的名称。 1.该名称由字母、数字和下划线字符组成。 2."_top"、"_blank"、"_self"具有特殊意义的名称。 _blank:在新窗口显示目标网页 _self:在当前窗口显示目标网页 _top:框架网页中在上部窗口中显示目标网页 3.相同 name 的窗口只能创建一个,要想创建多个窗口则 name 不能相同。 4.name 不能包含有空格。 参数字符串:可选参数,设置窗口参数,各参数用逗号隔开。
参数表:
[url=http://img.mukewang.com/52e3677900013d6a05020261.jpg]
例如:打开http://www.imooc.com网站,大小为300px * 200px,无菜单,无工具栏,无状态栏,有滚动条窗口:<script type="text/javascript"> window.open('http://www.imooc.com','_blank','width=300,height=200,menubar=no,toolbar=no, status=no,scrollbars=yes') </script>
注意:运行结果考虑浏览器兼容问题。
相关文章推荐
- js 中实现页面跳转的方法(window.location和window.open的区别)
- js中的window.open返回object的错误的解决方法
- 个人笔记 js 03 window.open的使用方法
- js实现window.open不被拦截的解决方法汇总
- JS窗口问题处理:使弹出窗口保持前端显示的几种方法,及window窗体对象open()和showModalDialog()用法
- js 用 window.open()方法跳转到新页面并且用post方式传参
- 在easyui框架中使用JS和window.open方法提交数据至Servlet并导出POI数据表格
- JS判断鼠标进入容器方向的方法和分析window.open新窗口被拦截的问题
- Js弹出窗口代码,window.open方法
- Js window Open页面间传值方法
- js的window.open方法参数
- 如何让安卓WebView支持js调用window.open()和window.close()的方法。
- JS窗口问题处理:使弹出窗口保持前端显示的几种方法,及window窗体对象open()和showModalDialog()用法
- js里面window.open方法的详细定义和用法
- js中的window.open方法详解
- window.open方法使用中的问题及js中的两个值相加
- 本文实例讲述了js实现window.open不被拦截的解决方法。
- System.Windows.Forms.WebBrowser中 处理 js 脚本 window.Open 禁止新建窗口 的方法
- js关闭当前窗口,window.close()方法只能是window.open打开的才能执行关闭
- js实现window.open不被拦截的解决方法汇总