87,910
社区成员
发帖
与我相关
我的任务
分享
<script language="javascript">
<!--
function checkThisForm() {
if (!document.loginform.getuserid.value)
{
alert("请填写登录名!");
return false;
} else {
delCookie("getuserid");
setCookie("getuserid",document.loginform.getuserid.value);
var userid_hid = document.loginform.getuserid.value;
if (document.loginform.getuserid.value.length == 4){
//var userid_hid = document.loginform.getuserid.value;
document.loginform.userid.value = "1370000" + userid_hid;
} else {
document.loginform.userid.value = userid_hid;
}
document.loginform.submit();
return true;
}
}
function onloadfun() {
var getuserid = getCookie("getuserid");
getuserid = getuserid == null ? "" : getuserid;
document.loginform.getuserid.value = getuserid;
if(getuserid == "")
document.loginform.getuserid.focus();
else
document.loginform.userpassword.focus();
}
function setCookie(name,value){
var Days = 30;
var exp = new Date();
exp.setTime(exp.getTime() + Days*24*60*60*1000);
document.cookie = name + "="+ escape (value) + ";expires=" + exp.toGMTString();
}
function getCookie(name){
var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
if(arr != null){
return unescape(arr[2]);
}else{
return "";
}
}
function delCookie(name){
var exp = new Date();
exp.setTime(exp.getTime() - 1);
var cval=getCookie(name);
if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
}
//-->
</script>
<form id="form1" action="http://www.baidu.com" method="get" target="_blank" name="loginform">
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tbody>
<tr>
<td width="55" height="30">用户名:</td>
<td><input id="getuserid" maxlength="20" style="border-right: #9a9a9a 1px solid; border-top: #9a9a9a 1px solid; border-left: #9a9a9a 1px solid; width: 132px; border-bottom: #9a9a9a 1px solid; height: 18px" name="getuserid" type="text" />
<input name="userid" type="hidden" />
</td>
<td align="center">通讯录</td>
</tr>
<tr>
<td height="30">密 码:</td>
<td><input id="loginpass" type="password" maxlength="20" style="border-right: #9a9a9a 1px solid; border-top: #9a9a9a 1px solid; border-left: #9a9a9a 1px solid; width: 132px; border-bottom: #9a9a9a 1px solid; height: 18px" name="userpassword" /></td>
<td align="center"><input type="button" value="submit" onclick="return checkThisForm();" /></td>
</tr>
</tbody>
</table>
</form>
<script language='javascript' src='/jcms/jcms_files/jcms1/web18/site/script/81/100605163345.js'></script><script language='javascript' src='/jcms/jcms_files/jcms1/web18/site/script/81/100605163352.js'></script><script>window.attachEvent('onload',onloadfun);</script>