//index.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head>
<frameset rows="80,*" frameborder="no" border="0" framespacing="0">
<frame src="http://www.baidu.com" name="topFrame" id="topFrame" title="topFrame" />
<frame src="test.html" name="mainFrame" id="mainFrame" title="mainFrame" /></frameset>
<noframes>
<body></body>
</noframes>
</html>//test.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<script type="text/javascript">
function saveHtml() {
var fso = new ActiveXObject("Scripting.FileSystemObject");
var f = fso.OpenTextFile("C:\\a.html", 2, true);
f.Write(document.documentElement.outerHTML);
f.Close();
fso = f = void(0);
} document.writeln(window.parent.frames.length);
document.writeln(document.title);
mywindow = window.parent.frames[0];
document.writeln(mywindow.document.title);
</script>
</body>
</html>请问访问不对吗?
解决方案 »
- 很有意义的一帖,如何在textarea中立刻显示出字体渲染效果
- My97DatePicker 浏览器兼容问题
- IE 里面加载的控件,是要怎么注册进去的,能否修改配置文件加载
- jquery.zclip.js应用问题
- 弹出窗体下边的状态条?
- 表格数据导出JSON
- 如何判断textarea筐里的字符,我要求只允许输入中文,不能输入英文字母?
- 正则表达式转义的问题
- javascript应答窗口的方式能回传数据吗???window.showModalDialog("test.aspx?父亲页面的控件值=×××")
- 可否当场获知:多选下拉单中,最新点击的是第几个选项
- js IE8的地址栏和状态栏如何去掉??
- 如何实现以下字符串的功能
//修改后的test.html
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>无标题文档</title>
</head><body>
<script type="text/javascript"> document.writeln(window.parent.frames.length);
document.writeln("<br>");
//document.writeln(document.title);
mywindow = window.parent.frames[1];
document.writeln("document.frames[1]'s title is:");
document.writeln(mywindow.document.title);
document.writeln("<br>");
mywindow = window.parent.frames[0];
document.writeln("document.frames[0]'s title is:");
document.writeln(mywindow.document.title);
</script>
</body></html>
http://topic.csdn.net/u/20081224/09/26aff992-d0ba-4f6f-a023-e0e96ecbe1fc.html?96078
http://www.zainanbao.com