关于JavaScript中的window.open方法。

今天下了Myeclipse,打算试试做jsp和Html

然后写了如下测试代码;

<!DOCTYPE html> 
WindowsDemo.html

<meta name="keywords" content="keyword1,keyword2,keyword3">

<meta name="description" content="this is my
page">

<meta name="content-type" content="text/html;
charset=UTF-8">

<script>

function fun(thisurl){

window.open(thisurl,"页面标题","width=370,heigth=160,scrollbars=yes,resizeable=no");

}

</script>

FFIVE
浏览 492回答 2
2回答

白猪掌柜的

语法open(URL, windowName, windowFeatures)参数URLA string specifying the URL to open in the new window. See the Location object for a描述 of the URL components.windowNameA string specifying the window name to use in the TARGET attribute of a FORM or A tag. windowName can contain only alphanumeric or underscore (_) characters.windowFeatures(Optional) A string containing a comma-separated list determining whether or not to create various standard window features. These options are described below.windowName的参数取值为_blank,_self,_top,_parent,他们的含义与html中相同。如:<script language="javascript">function backToIndex(){window.open("../index.jsp","_parent");}</script><input type="submit" name="Submit" value="提交" onclick=” backToIndex();”>是不会响应的,这样就会响应:<input type="button" name="Submit" value="提交" onclick=” backToIndex();”>&nbsp;

慕慕森

window.open(pageURL,name,parameters)其中:pageURL 为子窗口路径name 为子窗口句柄parameters 为窗口参数(各参数用逗号分隔)
打开App,查看更多内容
随时随地看视频慕课网APP

相关分类

JavaScript