我的联系表格有什么问题?

时间:2013-01-19 15:19:12

标签: forms contact

有人可以看一下我网站的代码并告诉我为什么我的联系表格无效吗?

以下是代码的相关部分:

来自contact.html文件:

<h3 class="indent-bot2">Contact Form</h3>
    <form action="#" id="contact-form">
        <div class="success"> Contact form submitted!<br>
            <strong>We will be in touch soon.</strong> </div>
            <fieldset>
                <label class="name">
                <input type="text" value="Enter Your Name:">
                <span class="error">*This is not a valid name.</span> 
                <span class="empty">*This field is required.</span> </label>

                <label class="email">
                <input type="text" value="Enter Your E-mail:">
                <span class="error">*This is not a valid email address.</span> 
                <span class="empty">*This field is required.</span> </label>

                <label class="phone">
                <input type="tel" value="Enter Your Phone:">
                <span class="error">*This is not a valid phone number.</span> 
                <span class="empty">*This field is required.</span> </label>

                <label class="message">
                <textarea>Enter Your Message:</textarea>
                <span class="error">*The message is too short.</span> 
                <span class="empty">*This field is required.</span> </label>
                <div class="buttons-wrapper">
                    <a class="button" data-type="reset">Clear</a>
                    <a class="button" data-type="submit">Send</a>                          
                </div>                                          
            </fieldset>
    </form>

同样来自contact.html文件:

<script type="text/javascript">
    $(window).load(function(){
        $('.slider')._TMS({
            duration:800,
            easing:'easeInCirc',
            preset:'zabor',
            pagination:false,
            slideshow:7000,
            banners:'fromTop',
            nextBu:'.next',
            prevBu:'.prev',
            waitBannerAnimation:false,
            pauseOnHover:true,
            beforeAnimation:function(){
                $('.slider .prev')
                .stop()
                .animate({top:'425px'},300,'easeOutCirc')
                $('.slider .next')
                .stop()
                .animate({top:'425px'},300,'easeOutCirc')
            },
            afterAnimation:function(){
                $('.slider .prev')
                .css({top:'425px'})
                .stop()
                .animate({top:'327px'},300,'easeOutCirc')

                $('.slider .next')
                .css({top:'425px'})
                .stop()
                .animate({top:'327px'},300,'easeOutCirc')
            }
        })

        $('#contact-form').forms({
            ownerEmail:'info@dohatutor.com'
        })

    });
    </script>

我认为这是链接到javascript文件的代码段,而javascript文件又调用“mailhandler.php”。

2 个答案:

答案 0 :(得分:3)

<form action="some script"  METHOD="POST"   ENCTYPE="multipart/form-data"></form>

action =“用于处理表单的php或asp或pl脚本”

答案 1 :(得分:0)

您没有指定表单应发布到的位置 - 您要将此表单发布到的脚本的名称是什么?

现在说:

form action="#"

它应该说:

form action="contact.php"