一开始提交按钮是disabled的, 我想让所有信息都符合条件了,按钮才可以点击.
输入框是失去焦点时判断的.
该怎么写状态标记flag?
$(function() { var flag = false; $('#txt1').blur(function() { if('不符合条件') { alert('提示'); } }); $('#txt2').blur(function() { if('不符合条件') { alert('提示'); } }); $('#txt3').blur(function() { if('不符合条件') { alert('提示'); } }); })
About the judgment of information submitted on the form page? - PHP Chinese website Q&A - About the judgment of submitted information on the form page? - PHP Chinese website Q&A
Take a look around and learn.