实例首页
自学教程
IT工具箱
源代码
下载代码
上下布局
点击运行 >
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>html button form 属性实例 - 自学教程(runoops.com)</title> </head> <body> <form action="//demo.runoops.com/php/demo-form.php" method="get" id="nameform"> First name: <input type="text" name="fname" /><br> Last name: <input type="text" name="lname" /><br> </form> <p>下面的按钮是在表单元素外,但仍是表单的一部分。</p> <button type="submit" form="nameform" value="提交">提交</button> <p><b>注意:</b>除了 Internet Explorer 浏览器,其他主流浏览器都支持 form 属性。</p> </body> </html>
运行结果: