extjs combobox如何向服务器传值
时间:2011-03-09
来源:互联网
我是个combobox初学者我的代码如下JScript code
请问我怎么才能通过一个按钮把选中学生姓名时对应的学号传送到服务器端啊
Ext.require([ 'Ext.form.ComboBox', 'Ext.tip.QuickTips', 'Ext.data.*' ]); Ext.onReady(function() { Ext.tip.QuickTips.init(); // Define the model for a State Ext.regModel('State', { fields: [ {type: 'string', name: 'xh'}, {type: 'string', name: 'xm'} ] }); // The data for all states // The data store holding the states; shared by each of the ComboBox examples below // var store = new Ext.data.Store({ // model: 'State', // data: states // }); var comboxStore = new Ext.data.Store({ model: 'State', proxy: { type:'ajax', actionMethods: { create : 'POST', read : 'POST', update : 'POST', destroy: 'POST'}, url: "http://localhost:8080/cjcx/servlet/Getcj?Method=GetAllxhxm" , reader:'json' }, atuoLoad:false } ); // comboxStore.load(); // ComboBox with a custom item template var simple = new Ext.form.ComboBox({ fieldLabel: '请输入您的姓名', renderTo: 'simple', displayField: 'xm', valueField: 'name', // hiddenValue:'xh', // hiddenField:'xh', // hiddenName:'empUserNum', allowBlank : false, width: 500, labelWidth: 130, hideTrigger:true, // typeAhead:true,//延时查询,与下面的参数配合 // typeAheadDelay:250,//默认250 blankText:'输入姓名查询成绩', emptyText:'输入姓名查询成绩', listEmptyText:'请仔细核对姓名信息', minChars : 1, store: comboxStore, query:'remote', queryParam : 'empUserNum', // hiddernName : 'empUserNum', getInnerTpl: function() { return '<div ext:qtip="{xh}"> {xm}</div>'; } }); ////// Collapsible code panels; ignore: ///// Ext.select('pre.code').each(function(pre) { new Ext.form.FieldSet({ contentEl: pre, renderTo: pre.parent(), title: 'View code for this example', collapsible: true, collapsed: true }) }); });
请问我怎么才能通过一个按钮把选中学生姓名时对应的学号传送到服务器端啊
作者: mail1239 发布时间: 2011-03-09
该回复于2011-03-10 09:02:09被管理员删除
- 对我有用[0]
- 丢个板砖[0]
- 引用
- 举报
- 管理
- TOP
|
#2楼 得分:0回复于:2011-03-10 09:34:11
|
作者: y_h_t 发布时间: 2011-03-10
直接给参数就好了.
作者: dataminer_2007 发布时间: 2011-03-10
参数关键是不知道怎么写啊 请问有没有例子的代码啊 请问hiddenName:是怎么上传啊
作者: flyerwing 发布时间: 2011-03-10
相关阅读 更多
热门阅读
-
office 2019专业增强版最新2021版激活秘钥/序列号/激活码推荐 附激活工具
阅读:74
-
如何安装mysql8.0
阅读:31
-
Word快速设置标题样式步骤详解
阅读:28
-
20+道必知必会的Vue面试题(附答案解析)
阅读:37
-
HTML如何制作表单
阅读:22
-
百词斩可以改天数吗?当然可以,4个步骤轻松修改天数!
阅读:31
-
ET文件格式和XLS格式文件之间如何转化?
阅读:24
-
react和vue的区别及优缺点是什么
阅读:121
-
支付宝人脸识别如何关闭?
阅读:21
-
腾讯微云怎么修改照片或视频备份路径?
阅读:28