HTML5新增表单元素

<form action="" method="post">
            readonly:只读
            disabled:是否可用
            是否可用<input type="text" readonly="true" disabled="disabled" /><br />
            隐藏标签<input type="hidden" value="1" /><br />
            图标按钮<input type="image"  src="0.jpg" /><br />
            html5新增标签<br />
            颜色标签<input type="color" /><br />
            邮箱<input type="email"  placeholder="请输入邮箱地址"/><br />
            日期<input type="date" /><br />
            网址<input type="url" /><br />
            搜索<input type="search" /><br />
            提示框
            <input type="text" list="ss" />
            <datalist id="ss">
                <option>java</option>
                <option>php</option>
            </datalist>
            html5新增属性
             placeholder:提示信息
             pattern正则表达式
             required 必选项
            电话<input type="text" pattern="\d{11}" />
            地址<input type="text" required="required" />
            <input type="submit" name="注册" /><br />
            
        </form>

小试牛刀

代码如下:

<!--..
		<caption> 标签定义表格的标题。
		
		<caption> 标签必须直接放置到 <table> 标签之后。
		
		您只能对每个表格定义一个标题。
		.-->
		<table align="center">
			
			<caption>欢迎注册</caption>
			<tr>
				<td>用户名</td>
				<td><input  type="text"/></td>
			</tr>
			<tr>
				<td>密码</td>
				<td><input  type="password"/></td>
			</tr>
			<tr>
				<td>确认密码</td>
				<td><input  type="password"/></td>
			</tr>
			<tr>
				<td>性别</td>
				<td><input  type="radio" name="sex"/>男<input type="radio" name="sex"/>女</td>
			</tr>
			<tr>
				<td>年龄</td>
				<td><input  type="text"/></td>
			</tr>
			<tr>
				<td>学历</td>
				<td><select>
				<option>大专</option>
				<option>本科</option>
				<option>学历</option>
				 </select>
				</td>
			</tr>
			<tr>
				<td>爱好</td>
				<td>
					<input  type="checkbox"/> 吃饭
				<input  type="checkbox"/> 睡觉
				<input  type="checkbox"/> 打游戏
				</td>
			</tr>
			<tr>
				<td></td>
				<td><input  type="submit" value="提交"/>
				<input  type="reset" value="重置"/></td>
			</tr>
		</table>

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值