谷歌浏览器弹框报错:Error:status code is 0

MuBeiBei 2011-12-27 08:47:52
谷歌浏览器报错:Error:status code is 0

<div class="from">

<input id="ss_text" name="suggest" type="text" value="搜索小组、帖子、课程..." onkeydown="search_sub(this,event)" />

<img id="ss_img" onclick="search_sub(this,event)" style="cursor:pointer" src="http://s3.jsyxw.cn/res/sq/images/search/sousuo.jpg" alt="搜索" />

<form id="ss_form" action="" method="post"></form>

</div>

<script type="text/javascript">

function search_sub(ele,event){

var ss_text = document.getElementById('ss_text').value;

if(ss_text == '搜索小组、帖子、课程...')return;

if(ss_text){

var e = event || window.event;

if(ele.tagName == 'IMG' || e.keyCode == 13){

var ss_form = document.getElementById('ss_form');

ss_form.action = 'http://sq.yanxiu.com/search/search.at?appName=all&suggest='+ss_text;

ss_form.submit();

}

}

}



</script>


就是上面这段代码,键盘事件,当按下回车键的时候就提交表单页面跳转,但是在谷歌浏览器会弹出一个警告框Error:status code is 0,是为什么?别的ie,ff都好使~·不解。
...全文
453 2 打赏 收藏 转发到动态 举报
写回复
用AI写文章
2 条回复
切换为时间正序
请发表友善的回复…
发表回复
p2227 2011-12-28
  • 打赏
  • 举报
回复
我这边没有什么错误提示。。不知道跟跨域有无关,另外你的form怎么没把input包含进去?
MuBeiBei 2011-12-28
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 p2227 的回复:]

我这边没有什么错误提示。。不知道跟跨域有无关,另外你的form怎么没把input包含进去?
[/Quote]

页面没跨域~·

是不是这块ss_form.action = 'http://sq.yanxiu.com/search/search.at?appName=all&suggest='+ss_text;

传参数的问题?

87,910

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 JavaScript
社区管理员
  • JavaScript
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧