2020-12-25

表单语法

// 
<form method="post或get" action="result.html">-----
	<input type="reset" name="..." value="..."/>
	<input type="text" name=".." value=".."/>
	<input type="submit" name=".." value="..."/>
	<input type="password" name=".." value="..."/>
</form>

表单元素格式

type:类型,默认text,password、checkbox、radio、submit、reset、 file、hidden、image和button,
name: 指定表单元素名称
value: 元素初始值
size:指定表单元素的初始值宽度,
maxlength:type为text或password时,输入的最大字符数
checked:type为radio或checkbox时,指定按钮是否被选中

表单元素

文本框

// 
<input type="text" name="xxx" value="xxx" size="xxx" maxlength="xxx"/>

密码框

// 
<input type="password" name="xxx" size=""/>

单选按钮

// 
<input name="xxx" type="zzz" value="xxx" checked />

复选框

//
<input  type="checkbpk" name="xxx" type="zzz" value="xxx" />
<input  type="checkbpk" name="xxx" type="zzz" value="xxx" checked />

列表框

// 
<select name="" size="">
	<option value="" selected="selected">...</option>
</select>

按钮

//
<input  type="reset" name="xxx" type="zzz" value="按钮上显示文子" />
<input  type="image" src"xxx" />
<input  type="buootn" name="xxx" type="zzz" value="button按钮" />

多行本本域

// 
<textarea  name="xxx" clos="ccc" rows="zzz"> 文本内容</textare>

文件域

// 
<form action="" methos="" enctype="表单编码属性">
	<input type="vvv" name="zzz">
</form>

邮箱

// 
<input type="Email" name="zzz">

网址

// 
<input type="url" name="zzz">

数字

// 
<input type="number" name="zzz" min="0" max="ccc" step="ccc"/>

滑块

// 
<input type="range" name="zzz" min="0" max="ccc" step="ccc"/>

搜索框

// 
<input type="search" name="zzz" min="0" max="ccc" step="ccc"/>
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值