源代码:
<!DOCTYPE html> <html><head><meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> </head><body> <p><b>如何创建表单包含两个复选框和一个确认按钮:</b></p> <form action="demo-form.php" method="get"> <input type="checkbox" name="vehicle" value="Bike"> I have a bike<br> <input type="checkbox" name="vehicle" value="Car" checked="checked"> I have a car<br> <input type="submit" value="提交"> </form><hr> <p><b>如何创建表单包含两个单选框和一个确认按钮:</b></p> <form action="demo-form.php" method="get"> <input type="radio" name="sex" value="Male"> Male<br> <input type="radio" name="sex" value="Female" checked="checked"> Female<br> <input type="submit" value="提交"> </form><hr> <p><b>此例演示如何从表单发送电子邮件:</b></p> <h4>发送邮件到 someone@example.com:</h4> <form action="MAILTO:someone@example.com" method="post" enctype="text/plain"> Name:<br> <input type="text" name="name" value="your name"><br> E-mail:<br> <input type="text" name="mail" value="your email"><br> Comment:<br> <input type="text" name="comment" value="your comment" size="50"><br><br> <input type="submit" value="发送"> <input type="reset" value="重置"> </form> </body> </html>
运行结果:
Fmpq工具