go语言jpg图像复制 golang复制文件( 三 )


var password = obj.password.value.trim() ;
if(user_name==""){
alert("请输入登陆帐号") ;
obj.user_name.focus() ;
return false;
}
if(obj.user_name.value.trim().length4){
alert("登录id 不能小于4位") ;
obj.user_name.focus() ;
return false ;
}
if(obj.user_name.value.trim().length20){
alert("登录id 不能大于20位") ;
obj.user_name.focus() ;
return false ;
}
if(!isValidateTag(user_name)){
alert("请不要在帐号中输入以下字符“+ -()~*:| ”") ;
obj.user_name.focus() ;
return false;
}
if(password==""){
alert("请输入登陆密码") ;
obj.password.focus() ;
return false;
}
}catch(e){alert(e);}
imAccount = user_name;
imPassword = password;
var url = "/login/LoginAjax.jsp?rnd="+Math.random()+"user_name="+escape(user_name)+"password="+escape(password);
Request.sendPOST(url, "{status:-1,errno:5}", doLoginRes, true, doLoginFailed);
return false ;
}
function doLoginRes(req, data) {
var stat = {status:-100};
eval("stat="+req.responseText);
if(stat.status==0){
try {web5q.Start5QIM(imAccount, imPassword); } catch(e) {}
var str=stat.mop_status ;
window.location="/society/SocietyUserFirst.do" ;
}else{
if(stat.errno==4){
window.location="/regist/redirect.jsp" ;
return ;
}else if(stat.errno==5){
window.location="/login/LoginActivation.jsp?user_name="+document.LoginForm.user_name.value.trim() ;
return ;
}else
doLoginFailed(stat) ;
}
}
function doLoginFailed(stat) {
var errmsg = "未知错误";
switch (stat.errno) {
case 1:
errmsg = "用户不存在";
break;
case 2:
errmsg = "密码错误";
break;
case 3:
errmsg = "异常错误";
break;
case 5:
errmsg = "您的邮箱还没有激活您不能登陆";
break;
}
alert(errmsg) ;
document.LoginForm.user_name.focus() ;
}
function setFoc(){
document.LoginForm.user_name.focus() ;
}
//浏览器信息统计 wanghw add since 2006-8-7
function browserTotal(type){
if(null==type||type=="")return;
var info = "";
if(type=="flash"){
var installedVersion = com.deconcept.FlashObjectUtil.getPlayerVersion();
info = installedVersion.major+"."+installedVersion.minor+"."+installedVersion.rev;
}else if(type=="ie"){
info = getBrowserVer();
}else if(type=="timeout"){
info = window.location.href;
}else{return;}
var url = ""+type+"info="+info;
var divId = document.getElementById("browser");
if(divId) {
divId.src = https://www.04ip.com/post/url;
}else{
var stat = document.createElement("img id='browser' src='" + url + "' style='display:none;' /");
document.body.insertBefore(stat);
}
}
//取得浏览器版本 wanghw add since 2006-8-7
function getBrowserVer(){
var o;
o=window.navigator.appName
var s=window.navigator.appVersion;
if(s.indexOf("MSIE")!=-1){
s=s.slice(s.indexOf("MSIE")+4).slice(1,4);
}else{
alert("您好 , 目前5q系统仅支持IE6(Internet Explorer 6.0.),我们检测到您的浏览器不是IE,为了保障你的顺畅试用,我们建议您更换浏览器进行浏览 。\n我们会尽快解决兼容性的问题 , 给你造成不便 , 敬请谅解");//2006-8-8
s=s.slice(0,3);
}
return o+":"+s;
}
//超时处理统计函数 wanghw add since 2006-8-7
function timeOut(){
if(Hi.loadingTmr==0)return;
hideCoverAllFrm();
$("loadingMsg").style.display = "none";
if (Hi.loadingTmr0) {
clearTimeout(Hi.loadingTmr);
Hi.loadingTmr = 0;

推荐阅读