json中的对象数组

问题描述:

Hai,



使用此代码插入数据..

我需要将dat作为对象数组传递..怎么能我为此写代码??????





Hai,

Am using this code for Inserting Data..
I need to pass dat as object array.. How can I write code for this??????


var  dat = "{FeeNameId:'"+FeeNameId+"',FeeName:'" + FeeName + "',FeeType:'"+FeeType+"'}";
   var  url="../Services/FeesService.asmx/InsertFeeName"
       
        $.ajax({
        type: "POST",
        url: url,
        data: dat,
        dataType: "json",
        success: function (xml) {
            if (xml.d != null) {
                if (xml.d.SaveStat == true) {
                      
                    }
        },
        contentType: "application/json; charset=utf-8",
        failure: function (data) {
            Message('XML File could not be found');

        },
        error: function (XMLHttpRequest, textStatus, errorThrown) {
        Message(errorThrown);

        }
    });

.ajax({
类型: POST
url:url,
data:dat,
dataType: json
success:function(xml){
if (xml.d!= null ){
if (xml.d.SaveStat == true ){

}
},
contentType: application / json; charset = utf-8
失败: function(data){
消息(' 无法找到XML文件');

},
错误或:function(XMLHttpRequest,textStatus,errorThrown){
Message(errorThrown);

}
});
.ajax({ type: "POST", url: url, data: dat, dataType: "json", success: function (xml) { if (xml.d != null) { if (xml.d.SaveStat == true) { } }, contentType: "application/json; charset=utf-8", failure: function (data) { Message('XML File could not be found'); }, error: function (XMLHttpRequest, textStatus, errorThrown) { Message(errorThrown); } });