395. start : 0, 396. limit : 10 397. }});
398. //Ext.MessageBox.alert(\; //返回值
399. //显示[修改成功]
400. document.getElementById(\ck\
401. //透明度
402. Ext.get('loading').setOpacity(1);
403. Ext.get('loading').setOpacity(0.0,{duration:2,callback:function(){ 404. }}); 405. },
406. failure:function(){
407. Ext.MessageBox.alert(\失败\408. },
409. method:\410. //传入后台的参数
411. params:{'id':id,'name':name,'sex':sex,'bornDate':bornDate,'email':email} 412. 413. }); 414. } 415. 416.
417. //给表格单元格加单击事件
418. grid.addListener('cellclick', cellclick);
419. function cellclick(grid, rowIndex, columnIndex, e) { 420. //如果是编辑列允许操作 421. if(columnIndex==6){
422. var record = grid.getStore().getAt(rowIndex); //Get the Record
423. var fieldName = grid.getColumnModel().getDataIndex(columnIndex); //Get field name
424. var data = record.get(fieldName);
425. // Ext.MessageBox.alert('show','当前选中的数据是:'+data+\
426. //字符转日期格式
427. var bornDate=Ext.util.Format.date(record.get('birthday'),\
428. //调用子窗口
429. showDialog(record.get('id'),record.get('name'),record.get('sex'),bornDate,record.get('email'));
430. } 431. } 432. 433. }); 434. 435.
436. //子窗口
437. function showDialog(id,name,sex,birthday,email){
438. // alert(id+\439. var result=id+\
440. var doc=window.showModalDialog(%ult,\
441. \rollbars=no;status=no\442.
443. if(doc==\
444. window.location.reload(); 445. } 446. } 447.
448. 449. 450. 451.
test2.html Java代码
1.
2.
3. 4.
5.
7.
9.
10.