jquery跨域获取iframe里的dom元素

现在我有一个页面,页面里嵌入一个iframe元素,src="weibo.com",现在我想要通过jquery获取iframe里的WB_detail的内容,可以怎样做,求各位大神指导指导

阅读 17.4k
4 个回答

浏览器会限制跨与操作的,除非你是为浏览器开发插件,可以绕过权限

无解,只能通过后端。

You can't. XSS protection. Cross site contents can not be read by javascript. No major browser will allow you that. I'm sorry, but this is a design flaw, you should drop the idea.

放弃吧,无解的

撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进