不知为什么获取不到iframe里src 页面内的值 ,查了很久,没搞定。
1. 有一页面test.aspx 包含 <iframe id="eWebEditor1" src="../HtmlEditor/editor.htm?id=content"></iframe>
2.引用的editor.htm也包含一个<IFRAME ID="HtmlEditor" name="HtmlEditor" src="blankpage.htm">
3.blankpage.htm 页面的内容包含<body></body>
现在想在第一个页面test.aspx获取blankpage.htm页面中body的值。
我是这样写的:
var a=frames.eWebEditor1.HtmlEditor.document.body.innerHTML;
不知为什么在本机能获取到,更新到服务器上就获取不到,提示拒绝访问。我这个应该是没有跨域的。
请各位帮忙,万分感谢