サイト内検索

...HTML・XHTMLタグ...

フォーム

フォームの内容をメールで

フォームの内容をメールで送信するには、form要素にenctype属性を指定します。
[使い方]
<form method="post" action="mailto:info@sample.com"
enctype="text/plain">
属性 属性値 説明
method="post"postを指定します。
action="" 「"mailto:info@sample.com"」のように
mailto:に続けて 送信先のメールアドレスを
記述します。
?subject=件名と続けると件名の指定が出来ます。
action="mailto:info@sample.com?subject=問い合せ"
enctype="text/plain" text/plain(使い易い)
メールの本文として内容が
送信されます。
"multipart/form-data " multipart/form-data(文字化けをする場合)
メールに添付される形で内容が
送信されます。

サンプル

[bodyの中]

<form method="post" action="mailto:info@sample.com"enctype="text/plain">
<div class="sample">
お名前:<input type="text" name="name">
<input type="submit" value="送信する">
</div>
</form>

[ブラウザ上]

お名前:
←サンプル(送信できません。)

Copyright c 2007.10.01 luc All rights reserved.