日期:2014-05-16  浏览次数:20370 次

window对象中的open()方法
<%@ page contentType="text/html; charset=gb2312" language="java" import="java.sql.*" errorPage="" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
<script language="javascript">
function a()
{ var newwin=window.open("","good","height=200, width=500");
  newwin.location.href="default.html";
}
</script>
</head>
<body onload="a()">
</body>
</html>
这儿的新窗口对象newwin中的name属性怎么使用??当我要改变窗口中的height属性时,怎样用good访问?

------解决方案--------------------
name   
可选字符串参数,该参数可以设置新窗口的名称。   
相同name的窗口只能创建一个,要想创建多个窗口则name不能相同。