如何访问 iframe 内的网站并搜索内容

时间:2021-05-24 17:30:59

标签: php jquery iframe jquery-plugins

希望您一切顺利,我正在尝试访问 Google.com 和 iframe 内的网站,但看起来它在我的本地主机中被阻止,有什么办法可以做到吗?也许是一个像 Web 浏览器一样的 jquery 插件?这是我在代码中尝试以在我的网站中显示 Google.com 的内容:

<!DOCTYPE html>
<html>
<head>
    <title>My Test Page</title>
    <style type="text/css" href="style.css"></style>
    <script src="http://www.google.com/search?site=imghp&tbm=isch&q='searchstring'"></script>
</head>
<body>
<iframe id="if1" width="100%" height="254" style="visibility:visible" src="http://www.google.com/custom?q=&btnG=Search"></iframe>
</body>
</html>
<script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>

提前致谢

0 个答案:

没有答案