3 commonUtil.sendSynRequest = function(url){
10 success: function (resp) {
14 error: function(XMLHttpRequest, textStatus, errorThrown){
19 commonUtil.strToJson = function(str){
20 var json = eval('(' + str + ')');
24 commonUtil.arrayRemove = function(aryInstance, index){
25 if (aryInstance == undefined || aryInstance == null) {
28 for (var i = 0, n = 0; i < aryInstance.length; i++) {
29 if (aryInstance[i] != aryInstance[dx]) {
30 aryInstance[n++] = aryInstance[i];
33 aryInstance.length -= 1;
36 // (new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
37 // (new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
38 commonUtil.parseDate = function(dateObj, format){
40 "M+": dateObj.getMonth() + 1,
41 "d+": dateObj.getDate(),
42 "h+": dateObj.getHours(),
43 "m+": dateObj.getMinutes(),
44 "s+": dateObj.getSeconds(),
45 "q+": Math.floor((dateObj.getMonth() + 3) / 3),
46 "S": dateObj.getMilliseconds()
48 if (/(y+)/.test(format)) format = format.replace(RegExp.$1,
49 (dateObj.getFullYear() + "").substr(4 - RegExp.$1.length));
51 if (new RegExp("(" + k + ")").test(format))
52 format = format.replace(RegExp.$1, RegExp.$1.length == 1 ? o[k] :
53 ("00" + o[k]).substr(("" + o[k]).length));
57 commonUtil.strToJson = function(str){
58 var json = eval('(' + str + ')');