请教各位高手关于帧与帧之间的相互操作问题
各位大虾,我想通过javascript从一个网页的一个帧中控制另外一个帧中的文本框的内容我是这样做的
1。建一个网页1.htm
<html><head>
<title>New Page 1</title></head>
<frameset rows="175,*">
<frame name="header" scrolling="no" noresize src="2.htm" target="main">
<frame name="main" src="http://xxxxx.xxx/xxx.htm">
<noframes>..... </noframes>
</frameset>
</html>
这是2.htm的内容
<html><head>
<title>New Page 2</title></head>
<script language="JavaScript">
<!--
function b(){
window.top.main.document.coolsus.message.value+="asdasdasd";
}
//-->
</script>
<body>
<form>
<INPUT type=button name="aa" value="aa" onClick="b();">
</form>
</body></html>
=====================================
如果我设置1.htm中main的src为一个本地网页地址(如aa.htm),那我的程序可以运行
如果我设置1.htm中main的src为一个intwernet网页地址(如[url]http://www.xxxxxxxxxxxxx.com/aa.htm),它就总出现错误信息[/url]
"access is denied"
请教各位高手,这是怎么回事啊??? 浏览器不是说了么,access is denied,访问权限被禁止了,也就是说不能跨域操作
页:
[1]
