87,924
社区成员
发帖
与我相关
我的任务
分享
<!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>
<title>globe var test</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<SCRIPT LANGUAGE=javascript>
var hash={
var1: '1',
var2: '2',
json: {"id":"topbarF","src":"topbar.html"},
$ : function(id){
return document.getElementById(id);
},
doc : function(id){
var _w=document.getElementById(id);
var _d=_w.contentDocument||_w.contentWindow.document;
return _d;
}
}
</SCRIPT>
</head>
<frameset rows="82,1,*,5" cols="*" frameborder="NO" border="0" framespacing="0">
<frame id="topF" src="top.html" scrolling="NO" noresize marginwidth="0" marginheight="0" frameborder="NO" >
<frame id="topbarF" src="topbar.html" scrolling="NO" noresize marginwidth="0" marginheight="0" frameborder="NO" >
<frameset id="midF" cols="180,5,*,5,110" frameborder="NO" border="0" framespacing="0">
<frame id="leftF" src="left.html" noresize scrolling="auto" frameborder="NO" marginwidth="0" marginheight="0">
<frame id="leftbarF" src="leftbarswitch.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize BORDERCOLOR="#6699CC">
<frame id="mainF" src="main.html" marginwidth="0" marginheight="0" noresize scrolling="AUTO" frameborder="NO">
<frame id="rightbarF" src="rightbarswitch.html" marginwidth="0" marginheight="0" scrolling="no" frameborder="0" noresize BORDERCOLOR="#6699CC">
<frame id="rightF" src="right.html" marginwidth="0" marginheight="0" noresize scrolling="AUTO" frameborder="NO">
</frameset>
<frame id="bottomF" src="bottom.html" marginwidth="0" marginheight="0" scrolling="NO" frameborder="NO" noresize>
</frameset>
<noframes><body bgcolor="#FFFFFF" text="#000000">您的浏览器不支持框架</body></noframes>
</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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test</title>
<style type="text/css">
*{ padding:0; margin:0; font-size:14px; font-family:Arial, Helvetica, sans-serif; color:blue;}
body{background-color:#ccc; }
li{cursor:pointer;margin:15px}
</style>
<script type="text/javascript">
var doc=top.hash.doc;
var $=function(id){ return document.getElementById(id); }
function getData(id){
var o=doc('bottomF').getElementById(id);
doc('mainF').getElementById('show').innerHTML+="<span>一级框架总数</span>:<span>"+o.value+"<span><br>";
}
function getGlobeVarData(id){
var _type=typeof eval(id);
var _data=_type=='String'?_data:_type.toString();
doc('mainF').getElementById('show').innerHTML+="<span>公共变量"+id.replace('top.hash','')+"</span>:<span>"+_data+"<span><br>";
}
</script>
</head>
<body>
<div id='a'>
<ul>
<li onclick="getData('numFrame')">获取隐藏域数据</li>
<li onclick="getGlobeVarData('top.hash.json')">获取公共变量</li>
<li onclick="getGlobeVarData('top.hash.json')">获取公共变量</li>
</ul>
<div>
</body>
</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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test</title>
<style type="text/css">
*{ padding:0; margin:0; font-size:12px; font-family:Arial, Helvetica, sans-serif;}
body{background-color:#CCC;}
</style>
<script type="text/javascript">
window.onload=function(){
document.getElementById('numFrame').value=top.frames.length;
}
</script>
</head>
<body>
<input type="hidden" id='numFrame' />
</body>
</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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test</title>
<!--script src="http://code.jquery.com/jquery-latest.min.js" ></script-->
<style type="text/css">
*{ font-size:12px;}
body{ margin:0; padding:0; font-family:Arial, Helvetica, sans-serif; background-color:#fff; }
span {width:100px; background:yellow; margin:20px}
</style>
<script type="text/javascript">
</script>
</head>
<body>
<div id='show'></div>
</body>
</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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test</title>
<style type="text/css">
*{ padding:0; margin:0; font-size:12px; font-family:Arial, Helvetica, sans-serif;}
body{background-color:#ccc; }
</style>
<script type="text/javascript">
</script>
</head>
<body>
<iframe id="r" src="righttest.html" ></iframe>
</body>
</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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>test</title>
<style type="text/css">
*{ padding:0; margin:0; font-size:14px; font-family:Arial, Helvetica, sans-serif; color:blue;}
body{background-color:#fff; }
li{cursor:pointer;margin:15px}
</style>
<script type="text/javascript">
var doc=top.hash.doc;
var $=function(id){ return document.getElementById(id); }
function getData(id){
var o=doc('bottomF').getElementById(id);
doc('mainF').getElementById('show').innerHTML+="<span>一级框架总数</span>:<span>"+o.value+"<span><br>";
}
function getGlobeVarData(id){
var _type=typeof eval(id);
var _data=_type=='String'?_data:_type.toString();
doc('mainF').getElementById('show').innerHTML+="<span>公共变量"+id.replace('top.hash','')+"</span>:<span>"+_data+"<span><br>";
}
</script>
</head>
<body>
这是二级框架网页
<div id='a'>
<ul>
<li onclick="getData('numFrame')">获取隐藏域数据</li>
<li onclick="getGlobeVarData('top.hash.json')">获取公共变量1</li>
<li onclick="getGlobeVarData('top.hash.doc')">获取公共变量2</li>
</ul>
<div>
</body>
</html>
function ajaxRequest(url, data, callback, type) {
alert(bottomBarF.cacheF.validationCache);
//
if ( jQuery.isFunction( data ) ) {
callback = data;
data = {};
}
return jQuery.ajax({
type: "POST",
url: url,
data: data,
success: function(data) {
if(data.success)
callback(data);
},
dataType: type
});
};
这是contentF框架页面中,外部js调用bottomBarF框架的cacheF框架no |