开发者

Run cross-site javascript for a specific iframe in browser console for loaded page

开发者 https://www.devze.com 2023-02-28 17:33 出处:网络
Is it possible to run javascript commands on a browser for one iframe of the current loaded document (via consol开发者_如何学Ce or javascript: in URL)?

Is it possible to run javascript commands on a browser for one iframe of the current loaded document (via consol开发者_如何学Ce or javascript: in URL)?

Since it's a different domain, if i try document.getElementById('iframeID').contentWindow.document; i get an access denied.


if you're using firebug:

cd(frames[0]);
// run stuff now

I don't think it's currently possible in webkit debuggers (it wasn't as of about 6 months ago, but that may have changed), wouldn't have a clue how to do it in IE.

0

精彩评论

暂无评论...
验证码 换一张
取 消