日期:2014-05-16  浏览次数:20421 次

chrome下调用iframe内容报Unsafe JavaScript attempt to access frame

你用chrome的F12的页面工具,就可以看到他提示的错误:

Unsafe JavaScript attempt to access frame with URL file:///D:/temp/p.html from frame with URL file:///D:/temp/c.html. Domains, protocols and ports must match.

所以,当你放到服务器上面或者放到HTTP服务器上面就没有问题了。