更新时间:2023-11-02 23:44:28
$('form input[type="text"]').each(function(){
// Do your magic here
if (this.value.match(/\D/)) // regular expression for numbers only.
Error();
});
如果你有表格ID:
$('#formId input[type="text"]').each(function(){
// Do your magic here
});