PageSourceSearch

http://fonton.co.uk/eims.js

js fonton.co.uk collected 2026-10-08 07:46:27 UTC 5,364 bytes, 218 lines download raw bytes

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.