$("#submitbtn").click(function(){ var money = $("#money").attr("value"); var txttype = $("#txttype").attr("value"); var param = [ { name : 'money ', value : money} ,{ name : 'txttype', value : txttype} ]; $.ajax({ type: 'post', url: 'toSub.action', data: param, dataType: 'text', success: function(text){alert("操作成功");}, error: function(text) {alert("操作未成功");} });
黑色头发:http://heisetoufa.iteye.com/