function AddressVal5() {
$('.ma-addressEdit .address:visible input:text.number').each(function () {
var maxLength = $(this).attr('maxLength');
var thisLength = $(this).val().length;
// alert(maxLength + ' ' + thisLength)
//$(this).next('.error').hide();
if ($(this).val() == '' || thisLength < maxLength) {
alert("sa");
$(this).next('.error').show();
return false;
}
});
$('.ma-addressEdit .address:visible input:text, .ma-addressEdit .address:visible textarea').each(function () {
var maxLength = $(this).attr('maxLength');
var thisLength = $(this).val().length;
$(this).next('.error').hide();
if ($(this).val() == '' || thisLength < maxLength) {
$(this).next('.error').show();
}
});
}
我正在处理 jquery 验证,它可以正常工作
<a href="javascript:void(0);" class="clear" id="addressUpdateBtn"><img src="images/update.png" width="83" height="31" alt="Upate" onclick="AddressVal5()" /></a>
但不适用于
<asp:ImageButton ID="imgbtnNewADD" runat="server"
ImageUrl="~/_layouts/images/Experia/update.png" CssClass="Nbutton" OnClientClick="return AddressVal5();" ToolTip="Add" OnClick="imgbtnNewADD_Click" />
出现错误消息,但点击刷新请帮助..