开发者

How to check whether there is a specific sentence in an iframe?

how can I check with javascript whether in an iframe there is a specific text or not? For example if I have the ifr开发者_高级运维ame linking to www.example.com and now I want to check whether there is a the text "This is a test" on this site. I tried: Document.getElementsByTagName('Iframe')[0].innerHTML but it doesnt work. Do you have another solution? I dont want to use Curl or some php functions, it needs to be done in javascript.

Thank you! phpheini


Since your example uses a domain name, I'm going to assume you mean "A third party webpage" and not one that is on your own server.

I'm also going to assume that you mean "JavaScript running in the browser".

This is impossible for security reasons as described by the same origin policy.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜