如何把store裡的所有資料轉換成JSON傳給後台

2021-06-08 22:13:45 字數 623 閱讀 1090

//基本方法,ext提供的編碼轉換方式,但是我這邊失敗了。。。

var lstaddrecord=new array();

store.each(function(record) );

ext.ajax.request(

});

這是我自己的轉換方法

var panelstore = ext.getcmp(global.menu_id).getstore();

var jsondata="[";

if(panelstore instanceof ext.data.store)

rec=rec+col+":'"+value+"',";

}rec=rec.substring(0,rec.length-1);

if(rec==null||rec=="")else";

console.log(rec);

jsondata=jsondata+rec+",";

};});

jsondata=jsondata.substring(0,jsondata.length-1)+"]";

} console.log("最後的josn資料:"+jsondata);

如何列印hostent結構體中的所有資料

問題 hostent是gethostbyname 和gethostbyaddr 都會涉及到的乙個結構體。如下 struct hostent gethostbyname 的原型是 struct hostent gethostbyname const char name 函式的傳入值是網域名稱或者主機名...

如何把資料exp到Sql loader裡

如何把資料exp到sql loader裡 首頁 exp imp 摘自 不詳 exporting table data to sql loader files exporting table data to sql loader files下面是乙個如何把指定table裡的資料通過寫好的script來...

刪除所表的所有資料

在開發的時候往往新增不少的測試資料,在執行指令碼之前需要將原有的資料刪除,而且還會有外來鍵約束,標識列的問題。於是寫了這個自動刪除表的所有資料.1 ifobject id temp clear all data is null 2begin 3declare tablename varchar 50...