记得要引入文件
<link rel="stylesheet" href="lib/mui/css/mui.css" />
<script src="lib/mui/js/mui.js"></script>
<script src="lib/jquery/jquery-2.1.4.js"></script>
<div class="input-group-sma">
<div class="mui-input-group ">
<div class="mui-input-row">
<input type="text" value="1" name="mobile_num" class="mui-input-clear" placeholder="请输入手机号码"/>
</div>
<div class="mui-input-row">
<input type="password" name="password" class="mui-input-password" placeholder="请输入密码"/>
</div>
</div>
<button id="login_btn" type="button" class="mui-btn mui-btn-primary">登录</button>
</div>
<script>
login_h();
function login_h() {
("[name='mobile_num']").val().trim();
var password = .extend(/.test(phone))) {
return false;
} else {
return true;
}
}
})
if(!$.checkPhone(mobile_num)){
mui.toast("手机号码不合法");
return;
}
})
}
</script>