JS实现同时搜索百度和必应的方法

前端技术 2023/09/02 JavaScript

本文实例讲述了JS实现同时搜索百度和必应的方法。分享给大家供大家参考。具体如下:

这里实现同时搜索百度和必应的功能,输入关键字,点击“搜一下”按钮,两个搜索引擎的结果在同个页面打开,方便。

将下面这两个htm文件保存,放在同一个文件夹下,打开第一个文件就可以了。
index.htm的代码:

复制代码 代码如下:
<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">
<html>
<head>
<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">
<title>同时搜索百度和必应</title>
<meta http-equiv=\"keywords\" content=\"同时搜索百度和必应\">
<meta http-equiv=\"description\" content=\"同时搜索百度和必应\">
</head>

<!--<body style=\"text-align: center;\">
-->
<frameset rows=\"30%,70%\">
<frame src=\"keleyi.htm\">
</frame>
<frameset cols=\"45%,45%\">
<frame id=\"baiduFrame\" name=\"baiduFrame\" src=\"images/baidu.jpg\"></frame>
<frame id=\"bingFrame\" name=\"bingFrame\" src=\"images/baidu.jpg\"></frame>
</frameset>
</frameset>

<!--<iframe id=\"baiduFrame\" width=\"49%\" height=\"100%\" ></iframe>
<iframe id=\"bingFrame\" width=\"49%\" height=\"100%\" ></iframe>
</body>-->
</html>

本文地址:https://www.stayed.cn/item/4948

转载请注明出处。

本站部分内容来源于网络,如侵犯到您的权益,请 联系我

我的博客

人生若只如初见,何事秋风悲画扇。