搜索代码
<input type="text" value="" id="bing_keyword"> <input type="button" onclick="bing_search()" value="必应搜索"> <script language="javascript"> function bing_search(){ var str = document.getElementById("bing_keyword").value; str = escape(str);//解决中文乱码 var win = window.open("http://www.bing.com/search?q="+str); } </script>
<form onsubmit="return baiduWithHttps(this)" action="http://www.baidu.com/baidu" target="_blank"> <input name="tn" type="hidden" value="SE_zzsearchcode_shhzc78w"> <a href="https://www.baidu.com/" target="_blank"> <img src="https://www.baidu.com/img/baidu_jgylogo3.gif" alt="Baidu" align="bottom" border="0"> </a> <input type="text" onfocus="checkHttps" name="word" size="30"> <input type="submit"value="百度搜索"> </form> <script src="http://s1.bdstatic.com/r/www/cache/global/js/BaiduHttps_20150714_zhanzhang.js"></script> <script> function checkHttps () { BaiduHttps.useHttps(); }; function baiduWithHttps (formname) { var data = BaiduHttps.useHttps(); if (data.s === 0) { return true; } else { formname.action = 'https://www.baidu.com/baidu' + '?ssl_s=1&ssl_c' + data.ssl_code; return true; } }; </script>
博客园:冷色008
百度:冷色008