日期:2014-05-16  浏览次数:20313 次

自己网站调用百度时http 501 错误 着急
自己的网站调用百度搜索时,为什么会出现http 501 错误,刷新时才显示网页,在360浏览器用的时候是正常的,在IE,搜狗就会出现http 501 错误。

  var obj = document.getElementById('myform');

   
  obj.action="http://www.baidu.com/s?wd="+encodeURIComponent(document.getElementById('keyword').value);
   
 在此先谢过!

------解决方案--------------------
提交方式不对

HTML code
<form id="myform" target="_blank" name="myform"  action="http://www.baidu.com/s" >
    <input type="text" autocomplete="off" maxlength="100" name="word" id="word">
    <input type="image" src="images/searchbtn.gif" id="btnDoS"/>
</form>