日期:2014-05-16  浏览次数:20317 次

表单需要JS判断,IE下能正常提交,到火狐就不行了,请大大帮忙下
本帖最后由 oShanZhiYi 于 2013-01-10 17:43:57 编辑
           
 <script>
               
                function tjpl() {
                    var sFrom = document.getElementById("form33");
                    var pinglun_name = document.getElementById("pinglun_name");
                    var content = document.getElementById("content");
                    var pinglun_email = document.getElementById("pinglun_email");

                    if (Trim(pinglun_name.value) == "") {
                        alert("对不起,姓名必须输入!");
                        pinglun_name.focus();
                    } else if (!checkemaill(pinglun_email.value)) {
                        alert("对不起,请你输入正确的邮箱!");
                        pinglun_email.focus();
                    }

                    else {
                        sFrom.method = "post";
                        sFrom.action = ./123.php?flag=tjpl";
                        sFrom.submit();
                    }
                }

                function checkemaill(str) {
                    var myreg = /^([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|\_|\.]?)*[a-zA-Z0-9]+\.[a-zA-Z]{2,3}$/;
                    if (!myreg.test(str)) {

} else {
  &nbs