1 2/*æç´¢*/ 3function CKSearch() 4{ 5 if (trim(document.Searchform.Title.value)=="") 6 { 7 alert("请è¾å ¥å ³é®å"); 8 document.Searchform.Title.focus(); 9 return false; 10 exit; 11 } 12 13 return true; 14} 15 16/*æç´¢*/ 17function CKS() 18{ 19 if (trim(document.S2form.AgentName.value)=="") 20 { 21 alert("请è¾å ¥å¤§å¦åç§°"); 22 document.S2form.AgentName.focus(); 23 return false; 24 exit; 25 } 26 27 return true; 28} 29 30/*å¨çº¿çè¨*/ 31function CKBook() 32{ 33 if (trim(document.eform.UserName.value).length<2 || trim(document.eform.UserName.value).length>10) 34 { 35 alert("æµç§°ä¸º2~10个å符"); 36 document.eform.UserName.focus(); 37 return false; 38 exit; 39 } 40 return true; 41} 42 43 44// ================================================== 45 46 47/*ææ¯ä¾çæç¼©ç¥å¾*/ 48function DrawImage(ImgD,W,H){ 49 var flag=false; 50 var image=new Image(); 51 image.src=ImgD.src; 52 if(image.width>0 && image.height>0){ 53 flag=true; 54 if(image.width/image.height>= W/H){ 55 if(image.width>W){ 56 ImgD.width=W; 57 ImgD.height=(image.height*H)/image.width; 58 } 59 else{ 60 ImgD.width=image.width; 61 ImgD.height=image.height; 62 } 63 ImgD.alt= ""; 64 } 65 else{ 66 if(image.height>H){ 67 ImgD.height=H; 68 ImgD.width=(image.width*W)/image.height; 69 } 70 else{ 71 ImgD.width=image.width; 72 ImgD.height=image.height; 73 } 74 ImgD.alt=""; 75 } 76 } 77} 78 79/*å é¤ç©ºå符串*/ 80function trim(str){return str.replace(/(^\s*)|(\s*$)/g, "");} //å é¤å·¦å³ä¸¤ç«¯çç©ºæ ¼ 81function ltrim(str){return str.replace(/(^\s*)/g,"");} //å é¤å·¦è¾¹çç©ºæ ¼ 82function rtrim(str){return str.replace(/(\s*$)/g,"");} //å é¤å³è¾¹çç©ºæ ¼ 83 84/*æ¾ç¤ºéèä¸çº§èå*/ 85function sc(s){$Obj(s).style.display="block";} 86function hc(s){$Obj(s).style.display="none";} 87 88function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";} 89function $(s){return document.getElementById(s);} 90function $Obj(objname){return document.getElementById(objname);} 91 92// ================================================== 93 94 95/*ä¼åç»å½*/ 96function CKLogin() 97{ 98 if (trim(document.Loginform.UserName.value).length<2 || trim(document.Loginform.UserName.value).length>15) 99 { 100 alert("ç¨æ·åé误"); 101 document.Loginform.UserName.focus(); 102 return false; 103 exit; 104 } 105 if (trim(document.Loginform.PassWord.value).length<5 || trim(document.Loginform.PassWord.value).length>18) 106 { 107 alert("å¯ç é误"); 108 document.Loginform.PassWord.focus(); 109 return false; 110 exit; 111 } 112 if (trim(document.Loginform.Code.value) == "") 113 { 114 alert("请填åéªè¯ç "); 115 document.Loginform.Code.focus(); 116 return false; 117 exit; 118 } 119 return true; 120} 121 122/*ä¼å注å*/ 123function CKReg() 124{ 125 if (trim(document.Regform.UserName.value).length<2 || trim(document.Regform.UserName.value).length>15) 126 { 127 alert("ç¨æ·å为2~15个å符"); 128 document.Regform.UserName.focus(); 129 return false; 130 exit; 131 } 132 if (trim(document.Regform.PassWord.value).length<6 || trim(document.Regform.PassWord.value).length>18) 133 { 134 alert("å¯ç 为6~18个å符"); 135 document.Regform.PassWord.focus(); 136 return false; 137 exit; 138 } 139 var ispass=(/^\w+$/); 140 if (!ispass.test(document.Regform.PassWord.value)) 141 { 142 alert("å¯ç åªè½å å«åæ¯æ°å"); 143 document.Regform.PassWord.focus(); 144 return false; 145 exit; 146 } 147 if (trim(document.Regform.PassWord.value) !== trim(document.Regform.fPassWord.value)) 148 { 149 alert("两次è¾å ¥çå¯ç ä¸ä¸è´"); 150 document.Regform.fPassWord.focus(); 151 return false; 152 exit; 153 } 154 var isemail=(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/); 155 if (trim(document.Regform.Mail.value).length>30 || !isemail.test(document.Regform.Mail.value)) 156 { 157 alert("é®ç®±å°åé误"); 158 document.Regform.Mail.focus(); 159 return false; 160 exit; 161 } 162 if (trim(document.Regform.Code.value) == "") 163 { 164 alert("请填åéªè¯ç "); 165 document.Regform.Code.focus(); 166 return false; 167 exit; 168 } 169 return true; 170} 171 172/*订è´äº§å*/ 173function CKOrder() 174{ 175 if (trim(document.formOrder.ProductName.value) == "") 176 { 177 alert("产ååç§°ä¸è½ä¸ºç©º"); 178 document.formOrder.ProductName.focus(); 179 return false; 180 exit; 181 } 182 if (trim(document.formOrder.Num.value) == "") 183 { 184 alert("è®¢è´æ°éä¸è½ä¸ºç©º"); 185 document.formOrder.Num.focus(); 186 return false; 187 exit; 188 } 189 if (trim(document.formOrder.UserName.value) == "") 190 { 191 alert("çå®å§åä¸è½ä¸ºç©º"); 192 document.formOrder.UserName.focus(); 193 return false; 194 exit; 195 } 196 if (trim(document.formOrder.Address.value) == "") 197 { 198 alert("详ç»å°åä¸è½ä¸ºç©º"); 199 document.formOrder.Address.focus(); 200 return false; 201 exit; 202 } 203 if (trim(document.formOrder.Tel.value) == "") 204 { 205 alert("èç³»çµè¯ä¸è½ä¸ºç©º"); 206 document.formOrder.Tel.focus(); 207 return false; 208 exit; 209 } 210 if (trim(document.formOrder.Code.value) == "") 211 { 212 alert("请填åéªè¯ç "); 213 document.formOrder.Code.focus(); 214 return false; 215 exit; 216 } 217 return true; 218}
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.