function CheckPasswd(s) { var patrn=/^(\w){6,20}$/; if (!patrn.exec(s)) return false return true }