js 验证函数 加个class就能用
///*
var isVaild = true;
var errMsg = "";
$(".required").each(function () {
if ($(this).val().length == 0) {
//alert(tip)
errMsg = $(this).prev().text() + "不能为空";
//$('#' + id).focus();
$(".btn_full").text("保存");
isVaild = false;
//console.log('111');
return false;
}
})
if (!isVaild)
{
window.wxc.xcConfirm(errMsg, window.wxc.xcConfirm.typeEnum.info);
return false;
}
//*/