0

私はこのテンプレートを持っていて、その内容をカスタマイズしましたが、ボタンのクリアまたは送信ボタンをクリックしても連絡先フォームが何も起こらない連絡先ページに行き詰まりました。私は、すべてがネットを介した調査からのものであるもののほとんどについてあまり知りませんが、これを修正することはできません. ここで何か不足していますか?

私が心に留めている質問: 1. 「アクション」に何かを入力するか作成する必要がありますか? 2. フォームを消去またはメールに送信するには、「href」に何を入力する必要がありますか?

または、より良いアイデアがあります。

<h2 class="p0">Contact Form</h2>
          <form id="contact-form" action="#" method="post" enctype="multipart/form-data">
            <fieldset>
              <label><span class="text-form">Name:</span>
                <input name="p1" type="text" />
              </label>
              <label><span class="text-form">Email:</span>
                <input name="p2" type="text" />
              </label>
              <div class="wrapper">
                <div class="text-form">Message:</div>
                <textarea></textarea>
              </div>
              <div class="buttons"> <a class="button-2" href="#">Clear</a> <a class="button-2" href="#">Send</a> </div>
            </fieldset>
          </form>
4

1 に答える 1

0

だけでなく、実際のボタンを使用してくださいbuttons

action、このフォームを処理するサーバーファイルの名前を入力します(例:)action="contact_form.php"。メールを送信したい場合は、下に置いてaction="MAILTO:someone@example.com"ください。

<h2 class="p0">Contact Form</h2>

<form id="contact-form" action="MAILTO:someone@example.com" method="post" enctype="multipart/form-data">
    <fieldset>
        <label><span class="text-form">Name:</span>

            <input name="name" type="text" />
        </label>
        <label><span class="text-form">Email:</span>

            <input name="email" type="text" />
        </label>
        <div class="wrapper">
            <div class="text-form">Message:</div>
            <textarea name="message"></textarea>
        </div>
        <div class="buttons">
            <input type="button" value="Clear" onclick="document.getElementById('contact-form').reset()"
            />
            <input type="submit" value="Send" />
        </div>
    </fieldset>
</form>
于 2013-02-04T15:15:09.597 に答える