οnsubmit="return checkLogin()"; 加return :如果checkLogin 返回false,则不提交表单,true提交表单。 不加return:不管是否true或者是false 都会提交表单