博客列表 >3月19日作业

3月19日作业

Nancy白开水的博客
Nancy白开水的博客原创
2018年03月20日 16:19:09428浏览

今天是第三天在中文网学习!

代码:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>3月19号作业</title>
</head>
<body>
<form action="" method="post">
<table border="0" cellspacing="0" cellpadding="8" width="400" bgcolor="powderblue">
<caption><h2>用户注册</h2></caption>
<tr><td colspan="2"><hr></td></tr>

<tr>
<td width="60"><label for="rd_name">邮箱:</label></td>
<td width="300"><input type="text" id="rd_name" name="name" value="" placeholder="example@mail.com" size="30" width="200"></td>
</tr>

<tr>
<td><label for="rd_password">密码:</label></td>
<td><input type="text" id="rd_password" name="password" value="" placeholder="字母+数字不少于10位" size="30"></td>
</tr>

<tr>
<td>性别:</td>
<td>
<input type="radio"  name="sex" value="male" id="rd_male"><label for="rd_male">男</label>
<input type="radio"  name="sex" value="female" id="rd_female"><label for="rd_female">女</label>
<input type="radio"  name="sex" value="secret" id="rd_secret" checked=""><label for="rd_secret">保密</label>
</td>
</tr>

<tr>
<td>兴趣:</td>
<td>
<input type="checkbox" name="hobby[1]" value="html" id="rd_html"><label for="rd_html">HTML</label>
<input type="checkbox" name="hobby[2]" value="css" id="rd_css"><label for="rd_css">CSS</label>
<input type="checkbox" name="hobby[4]" value="php" id="rd_php" checked=""><label for="rd_php">PHP</label>
</td>
</tr>

<tr>
<td><label for="level">级别:</label></td>
<td>
<select name="level" id="level" style="display: inline-block;width: 243px;height: 21px">
<option value="">小白</option>
<option value="" selected="">菜鸟</option>
<option value="">高手</option>
<option value="">专家</option>
</select>
</td>
</tr>

<tr>
<td><label for="rd_photo">头像:</label></td>
<td>
<img src="../images/13.jpg" height="30">
<input type="file" id="rd_photo" name="photo" accept="image/*">
</td>
</tr>

<tr>
<td valign="middle"><label>简介:</label></td>
<td><textarea name="comment" id="comment" rows="5" cols="40" placeholder="文明上网,理性发言"></textarea></td>
</tr>

<tr>
<td colspan="2">
<hr>
<input type="submit" name="submit" value="提交">
&nbsp;&nbsp;&nbsp;&nbsp;
<input type="reset" name="reset" value="重填">
</td>
</tr>

</table>
</form>
</body>
</html>

<!--问题
1.input标签里的value属性的值必须是小写吗?
2.input标签里的checkbox类型的name写成hobby[1]和hobby[]的区别是什么?产生的效果有何不同
-->

手写代码:

微信图片_201803201616581.jpg

微信图片_20180320161658.jpg


声明:本文内容转载自脚本之家,由网友自发贡献,版权归原作者所有,如您发现涉嫌抄袭侵权,请联系admin@php.cn 核实处理。
全部评论
文明上网理性发言,请遵守新闻评论服务协议