How to use JavaScript to access cross domain iFrame content?

后端 未结 6 1303
时光说笑
时光说笑 2021-01-28 16:20

I would like to use this code

window.parent.document.getElementById(\'message\').value  += \"\\r\\n\\r\\n[img]\"+response+\"[/img]\";

It works

6条回答
  •  后悔当初
    2021-01-28 16:55

    As stated, this falls under same origin policy, but there are some tricks that allow limited communication with the iframe. Take a look at http://ajaxify.com/run/crossframe/

提交回复
热议问题