欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  IT编程

HTML练习

程序员文章站 2022-04-14 21:57:44
userinfor

<!doctype html>
<html>
<head>
<title>userinfor</title>
</head>
<body>
<form action="#" method="get">
<table align="center" border="1px" cellspacing="0px" bordercolor="red"
cellpadding="10px">
<caption align="top">用户信息注册登录</caption>
<tr>
<td>用户名:</td>
<td><input type="text" name="username">
</td>
</tr>
<tr>
<td>密码:</td>
<td><input type="password" name="password">
</td>
</tr>
<tr>
<td>确认密码:</td>
<td><input type="password" name="password1">
</td>
</tr>
<tr>
<td>昵称:</td>
<td><input type="text" name="nickname">
</td>
</tr>
<tr>
<td>邮箱:</td>
<td><input type="text" name="e-mail">
</td>
</tr>
<tr>
<td>性别:</td>
<td><input type="radio" name="gender" value="male">男&nbsp;&nbsp;
<input type="radio" name="gender" value="female">女</td>
</tr>
<tr>
<td>爱好:</td>
<td><input type="checkbox" name="hobby" value="basketball">篮球&nbsp;&nbsp;
<input type="checkbox" name="hobby" value="football">足球&nbsp;&nbsp;
<input type="checkbox" name="hobby" value="volleyball">排球&nbsp;&nbsp;</td>
</tr>
<tr>
<td>城市:</td>
<td><select name="city">
<option value="beijing">北京&nbsp;&nbsp;
<option value="shanghai">上海&nbsp;&nbsp;
<option value="guangzhou">广州&nbsp;&nbsp;
<option value="wuhan">武汉&nbsp;&nbsp;
<option value="datong">大同&nbsp;&nbsp;
<option value="nanjing">南京&nbsp;&nbsp;
</select>
</td>
</tr>
<tr>
<td>头像:</td>
<td><input type="file" name="img">
</td>
</tr>
<tr>
<td>验证码:</td>
<td><input type="text" name="checknum"> <img
alt="上传的文件地址无效" src="vc.jpg"> <input type="button"
value="换一个" onclick="alert(1)">
</td>
</tr>
<tr>
<td>自我描述:</td>
<td><textarea name="自我简介" row="8" cols="30"></textarea>
</td>
</tr>
<tr>
<td align="center" colspan="2"><input type="submit" value="提交">
<input type="reset" value="重置">
</td>
</tr>
</table>
</form>
</body>
</html>

放到浏览器中执行如下:

HTML练习