1$(window).on('load',function(){ 2 chPageHeight(); 3 $(window).resize(function(){ 4 chPageHeight(); 5 }); 6}); 7 8/* 夿·é é¢é«åº¦å®ä½Footer */ 9$('head').append($('<style>').html('html.fixedFooter body footer{position: fixed; bottom: 0; width: 100%;}')); 10function chPageHeight(){ 11 var tempH=0; 12 tempH+=$('header').height(); 13 tempH+=parseInt($('header').css('padding-top')); 14 tempH+=parseInt($('header').css('padding-bottom')); 15 tempH+=parseInt($('header').css('margin-top')); 16 tempH+=parseInt($('header').css('margin-bottom')); 17 tempH+=$('.wrapper').height(); 18 tempH+=$('footer').height(); 19 tempH+=parseInt($('footer').css('padding-top')); 20 tempH+=parseInt($('footer').css('padding-bottom')); 21 tempH+=parseInt($('footer').css('margin-top')); 22 tempH+=parseInt($('footer').css('margin-bottom')); 23 24 if(tempH<window.innerHeight){ 25 $('html').addClass('fixedFooter'); 26 }else{ 27 $('html').removeClass('fixedFooter'); 28 } 29} 30 31//åå¾URLçParameter 32function getParameterByName(name, url) { 33 if (!url) url = window.location.href; 34 name = name.replace(/[\[\]]/g, "\\$&"); 35 var regex = new RegExp("[?&]" + name + "(=([^&#]*)|&|#|$)"), 36 results = regex.exec(url); 37 if (!results) return null; 38 if (!results[2]) return ''; 39 return decodeURIComponent(results[2].replace(/\+/g, " ")); 40} 41 42//éå ç®±ä¸è½é»èæ¯ãClose Button 43function openFancyboxByCloseClickFalse(url,width,height){ 44 var vH; 45 if(typeof height == 'undefined'){ 46 vH = 'auto'; 47 }else{ 48 vH = parseInt(height,10); 49 } 50 $.fancybox({ 51 autoSize : false, 52 padding : 0, 53 margin : 0, 54 scrolling : 'no', 55 title : this.title, 56 width : parseInt(width,10), 57 maxWidth : '95%', 58 height : vH, 59 href : url, 60 type : 'iframe', 61 'closeBtn' : false, 62 helpers : { 63 overlay : {closeClick: false} // prevents closing when clicking OUTSIDE fancybox 64 } 65 }); 66 return false; 67} 68 69//éå ç®±ä¸è½é»èæ¯ï¼è½é»é¸Close Button 70function openFancyboxByCloseClickTure(url,width,height){ 71 var vH; 72 if(typeof height == 'undefined'){ 73 vH = 'auto'; 74 }else{ 75 vH = parseInt(height,10); 76 } 77 $.fancybox({ 78 autoSize : false, 79 padding : 0, 80 margin : 0, 81 scrolling : 'no', 82 title : this.title, 83 width : parseInt(width,10), 84 maxWidth : '95%', 85 height : vH, 86 href : url, 87 type : 'iframe', 88 'closeBtn' : true, 89 helpers : { 90 overlay : {closeClick: false} // prevents closing when clicking OUTSIDE fancybox 91 } 92 }); 93 return false; 94} 95//åå·¦è£0 96function paddingLeft(str,len){ 97 var qq = Trim(str.toString()); 98 if(qq.length >= len){ 99 return qq; 100 }else{ 101 return paddingLeft("0" +qq,len); 102 } 103} 104//åå³è£0 105function paddingRight(str,lenght){ 106 var qq = Trim(str.toString()); 107 if(qq.length >= lenght){ 108 return qq; 109 }else{ 110 return paddingRight(qq+"0",lenght); 111 } 112} 113/**** å»é¤ç©ºæ ¼ ****/ 114function LTrim(str) { 115 return str.replace(/^[ \t\n\r]+/g, ""); 116} 117function RTrim(str) { 118 return str.replace(/[ \t\n\r]+$/g, ""); 119} 120function Trim(str){ 121 return LTrim(RTrim(str)); 122} 123 124//ç¢ºèªæ¯å¦çºæ¸å¼ 125function checkNumber(number) { 126 a = number; 127 date = a.match(/[^0-9]/g); 128 if(date || !a){ 129 return false; 130 }else{ 131 return true; 132 } 133} 134//ç¢ºèªæ¯å¦çºæ¸åæå°æ¸å¾å ©ä½å §(123 æ 123.12) 135function checkNumberFloat(number){ 136 a = number; 137 date = a.match(/^\d+(\.{1}[0-9]{1,2})*$/); 138 if(date || !a){ 139 return false; 140 }else{ 141 return true; 142 } 143} 144//ç¢ºèªæ¯å¦çºå°æ¸(æ ¼å¼çº123.123æ0.23456) 145function checkFloat(floatNumber){ 146 a = floatNumber; 147 re = /^-?\d+\.\d+$/; 148 if(!re.test(a)){ 149 return false 150 } 151 return true; 152} 153//ç¢ºèªæ¯å¦çºEmail 154function checkEmail(strEmail) { 155 emailRule = /^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9_-]+((\.|-)[A-Za-z0-9_-]+)*\.[A-Za-z_-]+$/; 156 if(strEmail.search(emailRule)!= -1){ 157 return true; 158 }else{ 159 return false; 160 } 161} 162 163//確èªè¯çµ¡é»è©±(å¸è©±) 164function checkTel(strTel){ 165 if (strTel.search(/^([0][1-9]{1,3}-([0-9]{5,8}))+((#([0-9]){1,5}){0,1})$/)!=-1) { 166 return true; 167 }else { 168 return false; 169 } 170} 171 172//ç¢ºèªææ©è碼 173function checkMobile(strMobile){ 174 if (strMobile.search(/^09[0-9]{8}$/)!=-1) { 175 return true; 176 }else { 177 return false; 178 } 179} 180 181//夿·èº«ä»½èåè 182function checkIdNumber(id_number){
183 184 if(id_number.length > 0){ 185 var data = id_number; 186 if(data.length != 10){return false;} 187 188 data1=data.substr(0,1); 189 data1=data1.match(/[a-zA-Z]{1}/); 190 if(data1 == null){return false;} 191 192 data2=data.substr(1,9); 193 data3=data2.match(/\d{9}/); 194 if(data3 == null){return false;} 195 } 196 197 //é©èæ ¼å¼ 198 var acc = 0,d0 = id_number.charAt(0),d1 = id_number.charAt(1),d2 = id_number.charAt(2),d3 = id_number.charAt(3),d4 = id_number.charAt(4), 199 d5 = id_number.charAt(5),d6 = id_number.charAt(6),d7 = id_number.charAt(7),d8 = id_number.charAt(8),d9 = id_number.charAt(9); 200 if ((d0 == "A") || (d0 == "a")) { acc = 10; }else if ((d0 == "B") || (d0 == "b")) { acc = 11; }else if ((d0 == "C") || (d0 == "c")) { acc = 12; } 201 else if ((d0 == "D") || (d0 == "d")) { acc = 13; }else if ((d0 == "E") || (d0 == "e")) { acc = 14; }else if ((d0 == "F") || (d0 == "f")) { acc = 15; } 202 else if ((d0 == "G") || (d0 == "g")) { acc = 16; }else if ((d0 == "H") || (d0 == "h")) { acc = 17; }else if ((d0 == "J") || (d0 == "j")) { acc = 18; } 203 else if ((d0 == "K") || (d0 == "k")) { acc = 19; }else if ((d0 == "L") || (d0 == "l")) { acc = 20; }else if ((d0 == "M") || (d0 == "m")) { acc = 21; } 204 else if ((d0 == "N") || (d0 == "n")) { acc = 22; }else if ((d0 == "P") || (d0 == "p")) { acc = 23; }else if ((d0 == "Q") || (d0 == "q")) { acc = 24; } 205 else if ((d0 == "R") || (d0 == "r")) { acc = 25; }else if ((d0 == "S") || (d0 == "s")) { acc = 26; }else if ((d0 == "T") || (d0 == "t")) { acc = 27; } 206 else if ((d0 == "U") || (d0 == "u")) { acc = 28; }else if ((d0 == "V") || (d0 == "v")) { acc = 29; }else if ((d0 == "X") || (d0 == "x")) { acc = 30; } 207 else if ((d0 == "Y") || (d0 == "y")) { acc = 31; }else if ((d0 == "W") || (d0 == "w")) { acc = 32; }else if ((d0 == "Z") || (d0 == "z")) { acc = 33; } 208 else if ((d0 == "I") || (d0 == "i")) { acc = 34; }else if ((d0 == "O") || (d0 == "o")) { acc = 35; } 209 210 if (acc == 0) { 211 return false; 212 } else { 213 accstr = new String(acc); 214 acc_1 = (accstr).charAt(0); 215 acc_2 = (accstr).charAt(1); 216 certsum = 1*acc_1 + 9*acc_2 + 8*d1 + 7*d2 + 6*d3 + 5*d4 + 4*d5 + 3*d6 + 2*d7 + 1*d8; 217 certsum_2 = parseInt(certsum%10); 218 certsum_3 = 10 - certsum_2; 219 if(certsum_2 == 0){ 220 certsum_3 = 0; 221 } 222 223 if (certsum_3 != d9) { 224 return false; 225 }else{ 226 return true; 227 } 228 } 229} 230//ç¢ºèªæ¥ææ ¼å¼ 231function checkDate(strDate){ 232 var re = /^\d{4}[-]\d{1,2}[-]\d{1,2}$/; 233 if(re.test(strDate)) { 234 return true; 235 }else{ 236 return false; 237 } 238} 239 240 241//=============================================================================================================================================== 242//åå¾éé®å¸å 243function changeAreaCantonForAjax(cityName,cantonName,select_canton){ 244 var cityId = document.getElementById(cityName).value; 245 $.ajax({ 246 type: "GET", 247 url: "ajax/ajax_area_canton.php", 248 data: {'cityId': cityId}, 249 dataType: "json", 250 cache: false, 251 success: function(data) { 252 var courseObj = document.getElementById(cantonName); 253 //Removeç®å鏿çéé®å¸åé¸å®å §å®¹ 254 $("#"+cantonName+" option").remove(); 255 256 courseObj.options.length = 0; 257 courseObj.options[0] = new Option ("éé®å¸å",""); 258 for (var i = 0; i < data.length; i++){ 259 courseObj.options[(i+1)] = new Option (data[i]['name'],data[i]['id']); 260 } 261 //é é¸ 262 if(typeof select_canton != '' && typeof select_canton != 'undefined'){ 263 if(select_canton.length>0){$(courseObj).val(select_canton);} 264 } 265 } 266 }); 267} 268 269//åå¾éµéåè 270function changeAreaCantonZipForAjax(cantonName,zipName){ 271 var cantonId = document.getElementById(cantonName).value; 272 $.ajax({ 273 type: "GET", 274 url: "ajax/ajax_area_zip.php", 275 data: {'cantonId': cantonId}, 276 dataType: "json", 277 cache: false, 278 success: function(data) { 279 //å°éµéåèåå¡«è³è¡¨å®ä¸ 280 $("#"+zipName).val(data); 281 } 282 });
283} 284 285//éæ°åå¾é©è碼 286function reSIImage(){ 287 var d1 = new Date(); 288 var when=d1.getTime(); 289 document.getElementById('siimage').src = "system_info/plugin/code/securimage_show.php?sid="+when; 290} 291 292//======================================================= 293//ç»åº 294function sendLogout() 295{ 296 var showMsg ="æ¯å¦è¦ç»åºåèªå°èï¼"; 297 298 if(confirm(showMsg)){ 299 $.ajax({ 300 type: "POST", 301 url: "ajax/send_logout.php", 302 dataType: "json", 303 cache: false, 304 success: function(data) { 305 // alert(data['url']); 306 location.replace(data['url']); 307 } 308 }); 309 } 310}
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.