有网友说 通过给form表单添加accept-charset="gb2312"和 onsubmit="document.charset='gb2312'" 但这样没能解决我的问题,我的源码是这样的:

这样做后,ie搜索还是不能成功,

后这样就可以了:

    <form method="get" target="_blank" id="searchform" name="searchform" accept-charset="gb2312" onsubmit="document.charset='gb2312';">
<input type="hidden" value="" name="searchtimes" />
<input type="hidden" value="simple" name="kind" />
<input type="hidden" name="client_id" value="web_search" />
<input type="hidden" value="qx" name="suchen_match" />
<input type="hidden" name="suchen_way" value="Ya" />
<input type="hidden" name="show_type" value="wenzi" />
<input type="hidden" name="library_id" value="all" />
<input type="hidden" name="suchen_type" value="" />
<input type="hidden" name="recordtype" value="all" />
<input type="text" class="search_input2" size="" name="suchen_word" id="suchen_word" style="width:300px" />
<input type="submit" value="校内提交" class="btn_seac" id="searchin" />
<input type="submit" value="校外提交" class="btn_seac" id="seachout" />
</form>
<script>
$(function () {
$("#searchin").click(function () {
searchform.action = "http://10.32.0.10/opac_two/search2/searchout.jsp";
$("#searchform").charset = "gb2312";
$("#searchform").submit();
})
$("#seachout").click(function () {
searchform.action = "http://218.107.150.8/opac_two/search2/searchout.jsp";
$("#searchform").charset = "gb2312";
$("#searchform").submit();
})
})
</script>

顺便丢个链接:关于urlencode , encodeURIComponent
http://www.blogjava.net/freeman1984/archive/2010/06/07/322965.html

form表单用ge方式提交时ie显示中文参数乱码的更多相关文章

  1. form表单以get方式提交时action中?后面的参数部分不生效

    form表单的提交方式是get方式,action="?sss=test",问号后面参数是接受不到的,谨记!

  2. form表单的两种提交方式,submit和button的用法

    1.当输入用户名和密码为空的时候,需要判断.这时候就用到了校验用户名和密码,这个需要在jsp的前端页面写:有两种方法,一种是用submit提交.一种是用button提交.方法一: 在jsp的前端页面的 ...

  3. 触发form表单的两种提交方式,submit和button的用法

    1.当输入用户名和密码为空的时候,需要判断.这时候就用到了校验用户名和密码,这个需要在jsp的前端页面写:有两种方法,一种是用submit提交.一种是用button提交. 方法一: 在jsp的前端页面 ...

  4. 【转载】form表单的两种提交方式,submit和button的用法

    1.当输入用户名和密码为空的时候,需要判断.这时候就用到了校验用户名和密码,这个需要在jsp的前端页面写:有两种方法,一种是用submit提交.一种是用button提交.方法一: 在jsp的前端页面的 ...

  5. 第一种方式:使用form表单将前端数据提交到servelt(将前端数据提交到servlet)

    第二种使用Ajax的形式将前台的数据传输到后台:https://blog.csdn.net/weixin_43304253/article/details/120335657 1.form表单 引入了 ...

  6. form表单取消按钮自动提交

    默认写在form表单里的按钮可以自动提交表单,现在要实现的效果是点击button按钮调用js函数,再有ajax提交 <button type="button" class=& ...

  7. form表单有条件的提交

    form表单提交数据,比如,积分,score,在0--100之间 var score = $('#score').val(); if(score !=''){ if(isNaN(score)){ la ...

  8. form表单的enter自动提交

    当form中只有一个文本框时并且获得焦点 按enter时,就会自动提交表单.阻止自动提交 可以添加一个隐藏的input框 <input type="text" style=& ...

  9. 如何为Form表单的多个提交按钮指定不同的Action地址?

    这是我很久以前看到的一个技巧,但我忘记在哪里了,当时遇到这样的需求,做了笔记,现在整理成文章分享出来,因为我感觉这个小技巧还是挺有用的,这种应用场景也算比较常见,比如一个表单有"保存&quo ...

随机推荐

  1. 异机恢复perform restores

    Restoring and Recovering the database on a new host 第一台机器上mount模式下做全备   new host:   1.配置oracle_sid和之 ...

  2. log4j加载方式导致的bae和sae部署异常

    这2天改在bae上部署代码,为了便于程序的功能测试,引入了log4j日志,但是问题来了..测试程序采用的是spring3.2.8框架搭建,web.xml引入日志代码为: <context-par ...

  3. Bash Shell read file line by line and substring

    #read one file line by line for line in $(cat test1.txt); do echo $line ; done; #while read split li ...

  4. 快速熟悉Zbrush中的四种裁切笔刷

    ZBrush 4.0R4完善了裁切的功能.捷就可以把模型想要隐藏的地方用选择裁切的方法隐藏掉,其中ZBrush在®4.0R4软件中提供了4中裁切笔刷,分别为ClipCircle笔刷.ClipCircl ...

  5. 微信公众号开发之LBS

    百度地图Web服务api:http://lbsyun.baidu.com/index.php?title=webapi 1.测距 Route Matrix API v2.0:http://lbsyun ...

  6. SQL里面如何取得前N条数据?

    select * from table order by id limit 10 运用limit可以获取前N个数据

  7. Redis安装,mongodb安装,hbase安装,cassandra安装,mysql安装,zookeeper安装,kafka安装,storm安装大数据软件安装部署百科全书

    伟大的程序员版权所有,转载请注明:http://www.lenggirl.com/bigdata/server-sofeware-install.html 一.安装mongodb 官网下载包mongo ...

  8. UVALive 6168 Fat Ninjas --二分小数+搜索

    题意:一个NxN的网格地板,有一些激光束从天花板垂直射向地面的某个网格,一个圆要安全地从左走到右,不碰到上边界,下边界以及激光束,问这个圆的直径最大能达到多大. 分析:可以二分直径,关键在check函 ...

  9. Windows远程桌面连接Ubuntu 14.04

    由于xrdp.gnome和unity之间的兼容性问题,在Ubuntu 14.04版本中仍然无法使用xrdp登陆gnome或unity的远程桌面,现象是登录后只有黑白点为背景,无图标也无法操作.与13. ...

  10. Eclipse打开xml文件报校验错误解决办法

    XML文件在Eclipse中报校验错误: The content of element type "web-app" must match "(icon?,display ...