验证字符串长度

	var testLen = function(showObj,str,minInfo,maxInfo,minLen,maxLen,calBack){
                // showObj [显示错误提示的对象]
                // str [要验证的字符创]
                // minInfo [长度太短的错误提示信息]
                // maxInfo [长度太长的错误提示信息]
                if(str.length < minLen){
						showObj.html(minInfo);
					}else if(str.length > maxLen){
						showObj.html(maxInfo);
					}else{
						if(typeof calBack == 'function'){
							calBack();
						}
					}
				}//end 验证字符成长度

 

 


posted @ 2012-02-07 12:14  Scool.Miss  阅读(291)  评论(0编辑  收藏  举报