<script type="text/javascript">
function js(id){
return document.getElementById(id);
}
function checkInput(){
js("msg").innerHTML ="";
var loginName = js("loginName").value;
var loginPwd = js("loginPwd").value;
var valiCode = js("valiCode").value;
if(loginName.length==0){
js("msg").innerHTML ="用戶名不能為空!";
}else if(loginName.length<5){
js("msg").innerHTML ="用戶名長度為6-20字符!";
}else if(loginPwd.length==0){
js("msg").innerHTML =" 密碼不能為空!";
}else if(loginPwd.length<5){
js("msg").innerHTML ="密碼長度為6-20字符!";
}else if(valiCode.length!=4){
js("msg").innerHTML ="驗證碼長度為4位!";
}else if(isNaN(valiCode)){
js("msg").innerHTML ="請輸入數字驗證碼!";
}else{
js("msg").innerHTML ="";
js("loginForm").submit();
}
}
//alert(loginName+":" + loginPwd+":"+ valiCode);
</script>
分享到:
相关推荐
5. Function Reference 7 5.1. Basic Functions 7 5.1.1. WTInfo 8 5.1.2. WTOpen 9 5.1.3. WTClose 10 5.1.4. WTPacketsGet 10 5.1.5. WTPacket 11 5.2. Visibility Functions 11 5.2.1. WTEnable 11 5.2.2. ...
<bspHtml:text styleClass="validate[required,custom[onlyNumberSp]]" property="user.loginName" size="45" styleId="user.loginName"> 验证规则非常多样,基本上包含了所有的数据类型的验证。
jquery.validate.js bbq.js jquery-ui-1.8.5.custom.min.js jquery.form.wizard- {version} 用法示例。 这是一个非常简单的设置。 $ ( function ( ) { $ ( "#demoForm" ) . formwizard ( {
Validate : function(theForm, mode){ var obj = theForm || event.srcElement; var count = obj.elements.length; this.ErrorMessage.length = 1; this.ErrorItem.length = 1; this.ErrorItem[0] = obj; for...
Chapter 6: WordPress Template Tag, Function, and CSS Reference 155 Class styles generated by WordPress 156 The search bar ID 156 Classes output by the media manager 157 Classes output by the ...
PEP 471 - os.scandir() function – a better and faster directory iterator PEP 475: Retry system calls failing with EINTR PEP 479: Change StopIteration handling inside generators PEP 485: A function...
## define query language constants / function names hibernate.query.substitutions yes 'Y', no 'N' ## select the classic query parser #hibernate.query.factory_class org.hibernate.hql.internal....
4.3.3. Zend_Cache_Frontend_Function 4.3.3.1. Introduction 4.3.3.2. A可用的选项 4.3.3.3. 例子 4.3.4. Zend_Cache_Frontend_Class 4.3.4.1. Introduction 4.3.4.2. Available options 4.3.4.3. Examples ...
stdafx.h的代码// This is a part of the Microsoft Foundation Classes C++ library. ...// All rights reserved. // // This source code is only intended as a supplement to the // Microsoft Foundation Classes ...
to add custom features to the system immediately, as and when required, without having to wait for the R&D department to deliver. These customized features are not added on as scripts to be ...
Creating Custom Resources.............................................................................................................. 2-4 Creating and Editing JNDI Provider Resources ..................