                    alert(errorThrown);
                }
            });
        });
    </script>
    <!--validate -->
    <script>
        function validateForm(element) {
            var result = true;
            element.find('[required]').each(
                function () {
                    var fieldElement = $(this);
                    var fieldId = $(this).attr('id');
                    //如果为null则设置为''
                    var value = fieldElement.val() || '';
                    i