if (!/^[0-9]+$/.test($.trim($('#addViewerSum').val()))) { alert('浏览次数格式为整数,请重新输入!'); $('#addViewerSum').focus(); }