1 /** 2 * id数组转换为json字符串 3 */ 4 function arrayTojson(arr) { 5 var jsonIds = "["; 6 for ( var i = 0; i < arr.length; i++) { 7 if (i == arr.length - 1) { 8 jsonIds += arr[i].eventid; 9 } else { 10 jsonIds += arr[i].eventid + ","; 11 } 12 } 13 return jsonIds += "]"; 14 }
1 /** 2 * 获取系统的url 3 * @returns fullUrl:系统访问路径,例如:http://localhost:8080/amudraya/amudraya 4 */ 5 function getURL(){ 6 var fullUrl = window.location.href; 7 var a=fullUrl.lastIndexOf(‘/‘); 8 fullUrl=fullUrl.substring(0,a); 9 var b=fullUrl.lastIndexOf(‘/‘); 10 fullUrl=fullUrl.substring(0,b); 11 var c=fullUrl.lastIndexOf(‘/‘); 12 fullUrl=fullUrl.substring(0,c); 13 return fullUrl; 14 }
时间: 2024-12-14 07:27:41