1. 程式人生 > >jQuery object array 轉換成 json格式

jQuery object array 轉換成 json格式

需要載入庫包,地址為:https://github.com/Krinkle/jquery-json

在jquery之後載入這個庫包

轉換方式為:

<script>

var where = new Object();

where['where_id_filter'] = "where_id_filter";
where['where_checkids'] = "where_checkids"

where = jQuery.toJSON(where);
 alert(where);

</script>