jQuery.form.js支持中文

在后台JAVA中对参数对应的转码:

java.net.URLDecoder.decode(request.getParameter("name"), "UTF-8");
 

把jquery.js 中的param中的

做一下encodeURIComponent就可以了

 

param: function( a ) {
         var s = [];
         // If an array was passed in, assume that it is an array
         // of form elements
         if ( a.constructor == Array || a.jquery ){
             // Serialize the form elements
             jQuery.each( a, function(){
                 s.push( encodeURIComponent(this.name) + "=" + 
              encodeURIComponent(encodeURIComponent( this.value )));
             });
         // Otherwise, assume that it's an object of key/value pairs
         }else{
             // Serialize the key/values
             for ( var j in a ){
                 // If the value is an array then the key names need to be repeated
                 if ( a[j] && a[j].constructor == Array ){
                     jQuery.each( a[j], function(){
                         s.push( encodeURIComponent(j) + "=" + 
                       encodeURIComponent(encodeURIComponent( this )));
                     });
                 }else{
                     s.push( encodeURIComponent(j) + "=" + 
                               encodeURIComponent(
                                    encodeURIComponent( 
                                        jQuery.isFunction(a[j]) ? a[j]() : a[j] )) );
                  }
              }
         }
         // Return the resulting serialization
         return s.join("&").replace(/%20/g, "+");
     }
 

 

 

 

相关推荐

MATLAB仿真耗散孤子共振与金兹堡-朗道方程解析

耗散孤子共振(DSR)是非线性光学中的特殊脉冲现象,通过平衡非线性效应、色散与能量耗散实现稳定传输。其核心数学模型金兹堡-朗道方程(GLE)描述了光脉冲在增益介质中的演化规律,采用分步傅里叶方法(SSFM)可高效求解这类非线性偏微分方程。该技术在光纤激光器设计、高速光通信系统优化等领域具有重要价值,特别是在需要高能量脉冲保持稳定传输的场景。MATLAB数值仿真为理解DSR物理机制提供了直观工具,通过参数扫描可验证脉冲能量与宽度的线性关系特征,并为实际器件设计提供预测依据。

weixin_31240035的博客 257

jQuery插件 -- Form表单插件jquery.form.js

转载:http://blog.csdn.net/zzq58157383/article/details/7718956#comments jQuery Form插件是一个优秀的Ajax表单插件,可以非常容易地、无侵入地升级HTML表单以支持Ajax。jQuery Form有两个核心方法 -- ajaxForm() 和 ajaxSubmit(), 它们集合了从控制表单元素到

Zoe_Wang_ing的专栏 1493

旋转因子量化仿真

在单bit接收机中,通过量化FFT核函数来简化计算,将复数坐标中旋转因子单位圆上的点近似到正方形四个边上,就能够用累加实现复数乘法,从而避免使用DSP乘法器。通过仿真查看不同阶的核函数简化效果。

CyberInversion的博客 3103

让jQuery.form.js支持中文

$.fn.param=function( a ) { var s = []; // If an array was passed in, assume that it is an array // of form elements if ( a.constructor == Array || a.jquery ) ...

漂渺影子的专栏 156

手把手教你用Verilog实现AT24C64的I2C读写(附完整仿真流程)

本文详细介绍了如何使用Verilog HDL设计AT24C64 EEPROM的I2C控制器,并配合ModelSim完成完整的仿真验证流程。内容涵盖I2C协议解析、Verilog状态机设计、AT24C64读写操作实现,以及仿真波形分析和调试技巧,为FPGA开发者提供了一套完整的EEPROM控制解决方案。

3c4x5z6v7b的博客 846

【水文学法总结】河道内生态流量计算方法(含MATLAB实现代码)

简介水文学法实现河道内生态流量计算

WW、forever的博客 5017

jQuery.autocomplete 支持中文输入

jQuery.autocomplete 是jquery的流行插件,,能够很好的实现输入框的自动完成(autocomplete)、建议提示(input suggest)功能,支持ajax数据加载。但唯一遗憾的是,在对中文输入法打开时,firefox3.0中是对中文拼音的自动匹配,而对输入后的中文无法及时触发匹配;而在我的IE6.0下,则无此问题。原因分析:Autocomplete 插件对用...

dianzongfan5428的博客 219

代谢组数据分析(一):生成代谢组数据SummarizedExperiment对象

本文介绍了基于Zeybel 2022年发布的多组学数据集的分析脚本,该数据集包含微生物组、宿主人体学指标、临床学指标、血浆代谢组和免疫因子等多维度数据,涵盖56位患者的横截面数据和22位患者的纵向时间序列数据。脚本旨在生成适用于下游分析的数据对象,主要包括phyloseq和SummarizedExperiment两类。phyloseq对象用于整合微生物群落数据,支持多数据整合、可视化、丰富分析功能和便捷的数据处理;SummarizedExperiment对象则广泛应用于基因组学和转录组学研究,便于数据整合、

专注生信领域 2989

jQuery.Autocomplete 支持中文

插件地址:http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ 插件下载地址:http://jquery.bassistance.de/autocomplete/jquery.autocomplete.zip   jQuery.Autocomplete是jquery的流行插件,能够很好的实现输入框的自动完

赶路人儿 1390

人工智能训练师三级考试备考全攻略|报名条件+真题+补贴申领一站式通关(2026版)

本专栏是人工智能训练师三级考证最完整的备考指南,共77篇文章,覆盖从职业认知、报名实操、AI基础知识、数据标注、模型训练测试部署、考前冲刺到考后进阶的全链路。本导读按模块整理了全部文章链接,帮你快速定位所需内容。人工智能训练师是国家认定的正式职业,证书可在osta.mohrss.gov.cn查询,三级证书可申领最高3120元技能补贴。

白话机器学习 1796

山东大学机试试题合集

山东大学机试试题合集

qq_63349644的博客 2622

jQuery.Autocomplete 中文支持

转载地址:http://conkeyn.iteye.com/blog/513337 插件地址:http://bassistance.de/jquery-plugins/jquery-plugin-autocomplete/ 插件下载地址:http://jquery.bassistance.de/autocomplete/jquery.autocomplete.zip  jQuer

ijavaweb 1100

数据库课程案例——电力公司收费管理系统分析与实践,完整带SQL语句

某电力公司收费管理信息系统实现客户信息、用电类型(类别号、类别名、电价)及业务员管理;实现客户用电信息管理(客户号、月份、用电类别号、用电度数);实现客户费用管理(客户号、月份、费用、收费标志),收费标志的默认值为“未收”;实现收费登记(客户、月份、应收费用、实收费用、业务员),并自动修改收费标志(用触发器实现);创建触发器,实现收费时自动更加应收费用和实收费用,计算本次结余,然后修改客户信息表中的结余金额;创建存储过程统计指定月份应收费用和实收费用;创建存储过程查询指定月份未交费的用户信息,以便崔费;创建

qq_44242804的博客 2762

jQuery Form Plugin应用心得

Technorati 标签: javascript,jquery,jquery.form.js,jquery form plugin jquery.form.js, http://malsup.com/jquery/form/, 中文文档地址:http://docman.cn/docs/jquery.form.plugin/jquery.form.plugin.html#faq jquery.

bokix的专栏 3589

C# WinForm 基于DirectShow.dll编写的程序,可边预览边保存视频,音频和图片

基于微软的DirectShow.dll的二次开发1.自动识别连接的摄像头跟麦克风且可以对其进行选择(默认选中第一个)2.可录制wmv和avi两种格式的视频并且都带有音频,avi可以录制的分辨率和帧数进行选择,wmv默认进行了淸晰度优化如不喜欢可去除代码中有相关提示3.可在预览点开之后进行拍照,也可边录制视频边拍照4.添加了视频和音频的压缩功能(酌情使用)这次二次开发发现C#对DirectShow的相关信息太少,这次做完也不敢藏私共享出来,还望大家指正

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

解决3.01版的jquery.form.js中文乱码问题

最近用到了jquery的一个fom插件,是一个全面支持表单的jQuery插件。昨天在用ajaxSubmit进行Form Post提交的时候,发现服务器端取回的中文数据居然是乱码。这个可能是因为jquery是utf-8,不支持gb2312。 网上搜了很多方法,可能因为我用的这jquery.form.js是3.01版,也就是今年3月6日才发布的版本(汗。。。就是前天),所以普...

weixin_30950237的博客 136

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

jQuery.ajax提交GB2312或GBK编码中文乱码问题

       最近遇到了一个小问题,编码问题,在使用mkdir来创建文件夹时,如果你的页面文件编码格式一定要是gb2312的,因为utf-8不支持中文格式的。如果文件是utf-8的中文文件名就会是乱码。       但在使用jquery和jquery.ajax时,JS会将字符转换成为utf-8的格式,这样与文件gb2312格式不符就会出现乱码。      我从网上找了一个经过处理的的jqu

4541

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

jQery.form.js中文API【整理】

j 关键字:jquery.form.js 英文原文:http://www.malsup.com/jquery/form/#api 表单插件API提供了几个方法,让你轻松管理表单数据和进行表单提交。 1.API方法 ajaxForm 增加所有需要的事件监听器,为AJAX提交表单做好准备。ajaxForm不能提交表单。在document的ready函数中,使用ajaxForm来为A

码农的田园 703

jquery.form.js中文API

英文原文:http://www.malsup.com/jquery/form/#api 表单插件API提供了几个方法,让你轻松管理表单数据和进行表单提交。 ajaxForm 增加所有需要的事件监听器,为AJAX提交表单做好准备。ajaxForm不能提交表单。在document的ready函数中,使用ajaxForm来为AJAX提交表单进行准备。ajaxForm接受0个或1个参数...

lichuhui 115

jquery autocomplete ajax获取动态数据,兼容各浏览器,支持中文

jquery.autocomplete.js经过改动,支持各种浏览器、支持中文输入! 1、效果图例如以下 2、HTML和ajax代码 &lt;!DOCTYPE html&gt; &lt;html xmlns="http://www.w3.org/1999/xhtml"&gt; &lt;head runat="server"&gt; &lt;meta ht...

weixin_34228617的博客 328

struts2+jquery.form.js文件上传注意事项

//在IE8却发现提示下载文件。 //IE 不支持 contentType 为application/json,在 ajax 上传文件完成后返回 json时 IE 提示下载文件。 //jquery利用的是iframe模式下无刷新上传,而iframe并不能直接获取返回json对象,返回的是一个对象数据流。 //在jquery.form.js这个插件中它的实现是利用返回的responseText来处理。也就是说,你要是返回一个text/html的contentType,那它就 //能接收到,并且对这个返回的

随风飘絮 1379

[jQuery]挑選日期的好物 jQuery Plugin [dynDateTime]中文化特別處理

剛好同事在輸入日期可以點選的工具,小喵經過那一次【jQuery初體驗】之後,自然而然就想到jQuery的一堆PlugIn 比較著名的是jQuery DatePicker,不過小喵覺得雖然他功能強大,光看說明文件就不得了,而style還得需要透過線上的功能產生css下載。比較麻煩的是中文化的部分,有些網站光這部分就寫了不少Code這讓小喵覺得。還是找找看有沒有其他的。 終於皇天不負苦心喵,...

abcd0101001的博客 266

jquery.form.js java_jquery.form.js中文API

默认值:nullsuccess表单成功提交后调用的回调函数。如果提供“success”回调函数,当从服务器返回响应后它被调用。然后由dataType选项值决定传回responseText还是responseXML的值。默认值:nulldataType期望返回的数据类型。null、“xml”、“script”或者“json”其中之一。dataType提供一种方法,它规定了怎样处理服务器的响应。这个被...

weixin_30789297的博客 72

jQuery,js,form表单,前端只是小零碎

遇到这么一个问题,如何让前端传递中文至后端不出现乱码. 1.第一反应是: 前后端编码一致性问题。 比如,前端是pc机,安卓机,IOS等等,对待中文支持不尽相同。 我使用了这种方式: URLDecoder.decode URLDecoder.ecode 前端使用ecode进行编译...

qq_33965352的博客 212

validationEngine中文版 — jquery强大的表单验证插件

中文汉化版,官方只有英文的。同时根据中国国情修改了部分验证规则。 这个插件支持大部分的浏览器,但由于有使用到了css3的阴影和圆角样式,所以在IE浏览器下无法看到圆角和阴影效果(万恶的IE)。官方下载地址:http://www.position-absolute.com/arti

zxingchao2009的专栏------用博客记录技术成长的点点滴滴 1270
上一篇: 函数准则
下一篇: 一些技术网站
gufengjava
博客等级 码龄16年 1粉丝 59原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值