function checkLogin(){ with(document.form1){ var ret=true; if(username.value==""){ alert("用户名不能空为!"); username.focus(); username.select(); ret=false; } else if(userpass.value==""){ alert("密码不能空为!"); userpass.focus(); userpass.select(); ret=false; } else if(checkcode.value==""){ alert("验证码不能空为!"); checkcode.focus(); checkcode.select(); ret=false; } if(ret==true){ document.form1.submit(); } } } function showLoginCheckCode(){ var codepath=document.getElementById('checkcode_img').src; if(codepath.indexOf('blank.gif')!=-1){ document.getElementById('checkcode_img').src='/image.asp'; } } document.writeln("