我需要在验证摘要中显示验证消息,并在单独的弹出窗口中显示它们。为了做到这一点,我正在考虑覆盖 WebForm_OnSumbit 方法。
function WebForm_OnSubmit() {
if (typeof (ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) {
showErrorPopup();
return false;
}
return true;
}
function showErrorPopup()
{
//Get the validation message text and append it to error popup div.
}
这样做是否可取?还是有其他方法可以实现它?