form表单用ge方式提交时ie显示中文参数乱码
有网友说 通过给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显示中文参数乱码的更多相关文章
- form表单以get方式提交时action中?后面的参数部分不生效
form表单的提交方式是get方式,action="?sss=test",问号后面参数是接受不到的,谨记!
- form表单的两种提交方式,submit和button的用法
1.当输入用户名和密码为空的时候,需要判断.这时候就用到了校验用户名和密码,这个需要在jsp的前端页面写:有两种方法,一种是用submit提交.一种是用button提交.方法一: 在jsp的前端页面的 ...
- 触发form表单的两种提交方式,submit和button的用法
1.当输入用户名和密码为空的时候,需要判断.这时候就用到了校验用户名和密码,这个需要在jsp的前端页面写:有两种方法,一种是用submit提交.一种是用button提交. 方法一: 在jsp的前端页面 ...
- 【转载】form表单的两种提交方式,submit和button的用法
1.当输入用户名和密码为空的时候,需要判断.这时候就用到了校验用户名和密码,这个需要在jsp的前端页面写:有两种方法,一种是用submit提交.一种是用button提交.方法一: 在jsp的前端页面的 ...
- 第一种方式:使用form表单将前端数据提交到servelt(将前端数据提交到servlet)
第二种使用Ajax的形式将前台的数据传输到后台:https://blog.csdn.net/weixin_43304253/article/details/120335657 1.form表单 引入了 ...
- form表单取消按钮自动提交
默认写在form表单里的按钮可以自动提交表单,现在要实现的效果是点击button按钮调用js函数,再有ajax提交 <button type="button" class=& ...
- form表单有条件的提交
form表单提交数据,比如,积分,score,在0--100之间 var score = $('#score').val(); if(score !=''){ if(isNaN(score)){ la ...
- form表单的enter自动提交
当form中只有一个文本框时并且获得焦点 按enter时,就会自动提交表单.阻止自动提交 可以添加一个隐藏的input框 <input type="text" style=& ...
- 如何为Form表单的多个提交按钮指定不同的Action地址?
这是我很久以前看到的一个技巧,但我忘记在哪里了,当时遇到这样的需求,做了笔记,现在整理成文章分享出来,因为我感觉这个小技巧还是挺有用的,这种应用场景也算比较常见,比如一个表单有"保存&quo ...
随机推荐
- AngularJS的一点学习笔记
ng-options="item.action for item in todos" ng-options表达式的基本形式, 形如 "<标签> for < ...
- Hibernate占位符?和:及JPA
小结一下hibernate占位符. 1.最常见的?占位符. String hql = "select a from Apple a where a.color=? a.weight>? ...
- Armstrong数
题目描述 在三位的整数中,例如153可以满足1^3 + 5^3 + 3^3 = 153,这样的数称之为Armstrong数.将所有的Armstrong数按小到大排序,试写出一程序找出指定序号的三位Ar ...
- Shell basic1
A shell script is a text file that typically begins with a shebang, as follows: #!/bin/bash /bin/bas ...
- Sql Practice 2
之前写了一个SP用来向dimention table插入0 -1 dummy row的值,但今天在process adventureworksdw2008示例 数据库的时候报错,查看了一下,是因为自己 ...
- [转]jQuery插件实现模拟alert和confirm
本文转自:http://www.jb51.net/article/54577.htm (function () { $.MsgBox = { Alert: function (title, msg) ...
- JS实现图片上传预览效果:方法一
<script type="text/javascript"> //处理file input加载的图片文件 $(document).ready(function(e) ...
- AC日记——无线网络发射器选址 洛谷 P2038
题目描述 随着智能手机的日益普及,人们对无线网的需求日益增大.某城市决定对城市内的公共场所覆盖无线网. 假设该城市的布局为由严格平行的129 条东西向街道和129 条南北向街道所形成的网格状,并且相邻 ...
- EventBus (三) 源码解析 带你深入理解EventBus
转载请标明出处:http://blog.csdn.net/lmj623565791/article/details/40920453,本文出自:[张鸿洋的博客] 上一篇带大家初步了解了EventBus ...
- View (一)LayoutInflater()方法详解
相信接 触Android久一点的朋友对于LayoutInflater一定不会陌生,都会知道它主要是用于加载布局的.而刚接触Android的朋友可能对 LayoutInflater不怎么熟悉,因为加载布 ...