首页 > 程序开发 > web前端 > JavaScript >

jQuery学习笔记--jQuery的ajax方法调用实例

2011-11-02

$.ajax({ url: 'saveEmergencyInfoFirstExe.action?users='+temp, data: { 'reportType':$("input[name='reportType']:checked").val(), 'eventId':$("#eventName").val(...

$.ajax({

url: 'saveEmergencyInfoFirstExe.action?users='+temp,

data: {

'reportType':$("input[name='reportType']:checked").val(),

'eventId':$("#eventName").val(),

'treeArSelected':checked_arIds.toString(),

'treeBusSelected':checked_busIds.toString(),

'emergency.occurtime':$("#occurTime").val(),

'emergency.address':$("#address").val(),

'emergency.content':$("#contents").val(),

'emergency.itRange':$("#itRange").val(),

'emergency.emergencyMeasure':$("#emergencyMeasure").val(),

'emergency.casualties':$("#casualties").val(),

'emergency.damage':$("#damage").val(),

'emergency.processId':$("#processId").val(),

'emergency.recovery':$("#recovery").val(),

'emergency.level':$("#level").val()

}, www.2cto.com

type:'POST',

dataType:'json',

success: function(json) {

alert('保存成功。');

window.returnValue = {result:'success'};

window.close();

},

error: function() {

window.close();

}

});

摘自 Hurry的专栏

相关文章
最新文章
热点推荐