首页
极刻
圈子
教程
开源
登录 / 注册
返回教程:HTML参考手册
TRY RUN / 在线示例
HTML参考手册 尝试一下
HTML参考手册 尝试一下
源代码
运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>安科教程(www.ancii.com)</title> </head> <body> <form action="/statics/demosource/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>
运行结果