点击清空文本框+++文本杠上敲回车提交

<script language="javascript">
function checkform(){
if(appform.mobileno.value=="" || appform.mobileno.value=="请输入手机号"){
   alert("请输入移动的手机号码");
   appform.mobileno.focus();
}else if(appform.passtxt.value=="" || appform.passtxt.value=="请输入业务密码"){
   alert("请输入业务密码");
   appform.passtxt.focus();
}else if(appform.validateCode.value=="" || appform.validateCode.value=="输入图形码"){
   alert("请输入图形验证码,如果看不清,请刷新页面");
   appform.validateCode.focus();
}else{
appform.submit();
}   
}

function caseType(){
   appform.passtxt.style.display="none";
   appform.password.style.display="";
   appform.password.focus();
}

function caseType2(){
   if(appform.password.value==""){
   appform.password.style.display="none";
   appform.password.value="";
   appform.passtxt.vlaue="请输入业务密码";
   appform.passtxt.style.display="";
   }
}
</script>
<form name="appform" method="post" action="" onSubmit="return checkform();" target="_parent">

<input name="mobileno" type="text" class="input_1221" id="mobileno" value="请输入手机号" maxlength="11"   οnblur="if(this.value==''){this.value='请输入手机号';}"   οnfοcus="if(this.value=='请输入手机号'){this.value='';}"   οnkeydοwn="if(event.keyCode==13){checkform();}"/>

<input name="passtxt" type="text" id="passtxt" value="请输入业务密码" maxlength="6" οnblur="if(this.value==''){this.value='请输入业务密码';};" οnfοcus="if(this.value=='请输入业务密码'){this.value='';}"   οnkeydοwn="if(event.keyCode==13){checkform();}"/>

<input name="validateCode" type="text" class="input_12212" id="validateCode" value="输入图形码" maxlength="4"   οnblur="if(this.value==''){this.value='输入图形码';}"   οnfοcus="if(this.value=='输入图形码'){this.value='';}"    οnkeydοwn="if(event.keyCode==13){checkform();}"/>

<input name="submit" type ="submit" class="input_12212" id="submit_test" value="提交"/>
posted @ 2016-07-29 14:06  离。  阅读(45)  评论(0编辑  收藏  举报