<input type="text" value="google搜索" name="google" /><input type="button" value="Google" name="google"/><br /> <script type="text/javascript"> $("input[type='button']").click(function(){ var value=$("input:text[name="+this.name+"]").val(); var link=""; //w3school var w3=" site:www.w3school.com.cn"; if(this.name=="baidu"){link="http://www.baidu.com/s?wd="} else if(this.name=="google"){link="http://www.google.com.hk/search?hl=zh-CN&source=hp&q="} open(link+value+w3); }); </script>
google搜索---搜索指定网页的内容
最新推荐文章于 2023-12-31 12:40:00 发布