我想知道$ _POST数组会发生什么,如果表单onsubmit =“return validate()”返回false。在我的情况下,它会被填充。我在javascript验证函数中检查了它的值。
function emailValidate() {
var result = true;
var email = document.getElementById('newsletter');
var field = document.getElementById('field');
var num = 0;
var re_Email = /([a-zA-Z_-]{3,20})+\@+([a-zA-Z]{3,10})+\.+([a-zA-Z]{2,5})$/;
if (re_Email.test(email.value)) {} else {
echo $_POST['email'];
var html = "<li style='width:230px; position:relative; margin-left:15px; margin-top:10px; text-align:center; font-size:13px; background-color:green'>Invalid email</li>";
$(html).appendTo("#field").fadeOut(3500);
}
}