当前位置:软件学堂 > 资讯首页 > 网络编程 > DIV+CSS > 表单中的提交按钮submit

表单中的提交按钮submit

2012/11/21 19:16:11作者:佚名来源:网络

移动端

【实例介绍】

表单中的提交按钮submit

提交按钮是一种特殊的按钮,单击该类按钮可以实现表单内容的提交。

【基本语法】

<input  type="submit"  name="按钮的名称"  value="按钮的取值"/>

【语法介绍】

在该语法中,value同样用来设置显示在按钮上的文字。

【实例代码】

<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>提交按钮</title> </head> <body> <table width="100%" cellspacing="0" cellpadding="0">   <tr>     <td><form action="mailto:weixiaofoxw.com" name="form1" method="post" enctype="application/x-www-form-urlencoded"target="_blank" >       <p>用户名                          :            <input name="textfield" type="text" size="20" maxlength="15" />       </p>       <p>密码:                 <input name="textfield2" type="password" value="abcdef" size="25" maxlength="6" />       </p>       <p>性别 :         <input name="radiobutton" type="radio" value="radiobutton" checked="checked" /> 男 <input type="radio" name="radiobutton" value="radiobutton" /> 女 </p>       <p>         <input type="submit" name="button" value="提交">       </p>     </form></td>   </tr> </table> </body> </html>

【代码分析】

在代码中,加粗的<input type="submit"name="button"value="提交">标记将按钮的名称设置为button,取值设置为“提交”,在浏览器中浏览效果,如图所示。

提交按钮submit运行效果

 【素材及源码下载】

请点击:提交按钮submit 下载本实例相关素材及源码

 

标签: 表单