javascript开发系列(多框架)
opener.window表示打开它的原框架。
top表示顶部框架,
parent引用包含这个窗口的window对像
例子如下;
a.htm页面
<!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 runat="server">
<title></title>
<script type="text/javascript">
function a(url,w,h) {
var x = window.screen.availWidth/2-w;
var y = window.screen.availHeight/2-h;
var str = "height="+h+",width="+h+",top="+y+",left="+x+",toolbar=no,menubar=no,scrollbars=no,resizable=no,location=no,status=no";
window.open(url, "_blank", str);
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="atxtName" runat="server" onclick="a('aa.aspx','100','500')"></asp:TextBox>
</div>
</form>
</body>
</html>
aa.html页面
<!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 runat="server">
<title></title>
<script type="text/javascript">
function aa() {
opener.window.document.getElementById('atxtName
相关文档:
SCRIPT 标记
用于包含JavaScript代码.
属性
LANGUAGE 定义脚本语言
SRC 定义一个
URL用以指定以.JS结尾的文件
window对象
每个HTML文档的顶层对象.
属性
frames[] 子桢数组.每个子桢数组按源文档中定义的顺序存
放.
f ......
JavaScript A Beginner's Guide 3rd Edition
锋利的jQuery
精通Dojo
Using The Dojo JavaScript Library To Build Ajax Applications
Professional JavaScript For Web Developers 2nd Edition
......
Technorati 标签: 电脑相关
原文地址:http://www.playes.net/Blog/535.asp
IE 浏览器的脚本失效是个源远流长的问题了,有时撞上了那也只能归结于缘分,完全没得解释。这次本人就是中大彩的缘分,被小小地撞了一下腰。
当然脚本失效也有轻重,有时是页面全部烂晒,图片文字全部显示错位,惨不忍睹,其实坏的这么彻底反 ......
javascript中的面像对像。
请看代码,下面弹出一个对话筐。
<script type="text/javascript">
function win(w, h,,url)
{
this.widt ......
首先在body中加入以下HTML内容:
<div id="panel">
<div id="top">
<ul id="menu">
<li id="1">Home</li>
&n ......