dongzhe6287 2013-05-07 14:28
浏览 74
已采纳

如何使用jquery或php强行点击iframe中的按钮

how to forcefully click on button in iframe using jquery or php.

example

<iframe src="www.google.com"></iframe>

i want to press the button or anchor tag in that iframe.

And also change anchor tag target -> '_self'

  • 写回答

3条回答 默认 最新

  • duanchun1881 2013-05-07 14:38
    关注

    Expanding on "not possible"...

    The "Same origin policies" apply: your only way of communicating with the contents of iframes that come from another [domain|subdomain|protocol|port] is through the postMessage API, which of course requires the other part (the document inside the iframe) to listen to your messages. This means that unless you're a google employee with access to the search frontend, this won't be possible.

    If you work at google and want to press a button forcefully, I recommend standing with your foot on your mouse: your weight will help push it with more strength.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?