如题。。话不多说帖代码。。。
<!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <title></title> <link href="../Scripts/ext-5.0.0.736/resources/ext-theme-crisp-all.css" rel="stylesheet" /> <link href="../Scripts/example.css" rel="stylesheet" /> <link href="../Scripts/ux/css/ItemSelector.css" rel="stylesheet" /> <script src="../Scripts/ext-5.0.0.736/ext-all.js"></script> <script src="../Scripts/ux/form/ItemSelector.js"></script> <script src="../Scripts/ux/form/MultiSelect.js"></script> <!--<link href="../Scripts/ux/css/ItemSelector.css" rel="stylesheet" />--> <script type="text/javascript"> Ext.onReady(function () { Ext.QuickTips.init(); Ext.form.Field.prototype.msgTarget = 'side'; //数据 var ds = new Ext.data.ArrayStore({ data: [[123, 'One Hundred Twenty Three'], ['1', 'One'], ['2', 'Two'], ['3', 'Three'], ['4', 'Four'], ['5', 'Five'], ['6', 'Six'], ['7', 'Seven'], ['8', 'Eight'], ['9', 'Nine']], fields: ['value', 'text'], sortInfo: { field: 'value', direction: 'ASC' } }); /* * Ext.ux.form.ItemSelector Example Code */ var isForm = new Ext.form.FormPanel({ title: 'ItemSelector Test', width: 700, bodyStyle: 'padding:10px;', renderTo: 'itemselector', items: [{ xtype: 'itemselector', name: 'itemselector', fieldLabel: 'ItemSelector', imagePath: '../ux/images/', multiselects: [{ width: 250, height: 200, store: ds, displayField: 'text', valueField: 'value' }, { width: 250, height: 200, store: [['10', 'Ten']], tbar: [{ text: 'clear', handler: function () { isForm.getForm().findField('itemselector').reset(); } }] }] }], buttons: [{ text: 'Save', handler: function () { if (isForm.getForm().isValid()) { Ext.Msg.alert('Submitted Values', 'The following will be sent to the server: <br />' + isForm.getForm().getValues(true));//这里是获得value的值,取值应该是使用request,名字是itemselector } } }] }); }); </script> </head> <body scroll="no" style="margin: 0; padding: 0; background-color: red;"> <!--<div id="itemselector"></div>--> <!-- <div id="Div1"></div>--> </body> </html>
Ext及UX引用路径
求大神赐教。。。有小demo也行。。谢谢啦。。^^