html简易表单

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <h1>Simple Form</h1>
    <title></title>
</head>
<body>
<form action="../index.html" method="post">
    <input type="hidden" value="2325120277" id="uid" >
    Username:<input type="text" name="username" id="username" placeholder="Please input your userName"/>
    Password:<input type="password" placeholder="Please input your password"/><br/>
    Identification:<input type="password"/><br/>
    Email number:<input type="text"/><br/>
    Cellphone number:<input type="tel"/><br/>
    Profile:<input type="text"/><br/>
    <input type="file"/><br/>
    Gender/Sex:<input type="radio" name="sex"/>male
    <input type="radio" mame="sex">female
    <br/>
    Hobby:<input type="checkbox"/>Singing
    <input type="checkbox"/>Dancing
    <input type="checkbox"/>Basketball
    <input type="checkbox"/>Reading
    <br/>
    Hometown:<select>
    <option>Please select</option>
    <option>HuBei</option>
    <option>BeiJing</option>
    <option>TaiWan</option>
    <option>California</option>
    <option>Everywhere</option>
</select>
    <br/>
    Birthday:
    <input type="datetime-local"/><br/>
    <input type="submit" value="Sign up"/>
    <input type="button" value="Common button"/>
    <input type="reset" value="Reset the button"/>
</form>
</body>
</html>

action : 直接提交的地址

			method : 
					get 方式  默认提交方式 ,会将参数拼接在链接后面 , 有大小限制 ,4k
					post 方式  会将参数封装在请求体中, 没有这样的限制
					
		
		input :
			type: 指定输入项的类型
				text : 文本
				password :  密码框
				radio :		单选按钮
				checkbox :  复选框
				file 	 : 上传文件
				submit   : 提交按钮
				button 	 : 普通按钮
				reset	 : 重置按钮
				hidden  : 隐藏域
				
				date    : 日期类型
				tel     : 手机号
				number   : 只允许输入数字
				
			placeholder : 指定默认的提示信息
			name : 在表单提交的时候,当作参数的名称
			id : 给输入项取一个名字, 以便于后期我们去找到它,并且操作它
		
		textarea : 文本域, 可以输入一段文本
					cols : 指定宽度
					rows : 指定的是高度
		
		select  : 下拉列表
			option : 选择项
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值