南大软院大神养成计划第十七天
2015-12-02 12:50
232 查看
写了个表单的,用了一点点javascript的语言还有CSS的,最后设计网页的时候应该会用到
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>个人注册页面</title>
</head>
<style type="text/css">
<!--
body{font-family:"新宋体";background-color:#ff99cc;padding-top:40px}
table,tr,td{;font-family:"楷体";font-size:25px;padding-left:100px;}
h1{text-align:center;font-size:37px;color="#9900ff";}
-->
</style>
<script type="text/javascript">
function checkall(){
var hobby = document.getElementsByTagName("input");
for(var i=0;i<hobby.length;i++)
{
hobby[i].checked=true;
}
}
function clearall(){
var hobby = document.getElementsByName("hobby");
for(var i=0;i<hobby.length;i++)
{
hobby[i].checked=false;
}
}
function jingguo(){confirm("只需要拖动进度条到相应的位置就可以啦");}
</script>
<body>
<form name="forml" method="post" action="">
<table width="700" align="center" cellpadding="20" >
<h1>注册表</h1>
<tr><td>姓名:<input name="username" type="text" size="20" placeholder="您的姓名"></td></tr>
<tr><td>年龄:<input name="age" type="text" size="20" placeholder="您的年龄"></td></tr>
<tr><td>性别:<input name="sex" type="radio" value="男" checked>男
<input name="sex" type="radio" value="女">女</td></tr>
<tr><td>生日:<input name="birthday" type="date" value="" placeholder="您的生日"></td></tr>
<tr><td>职业:<select name="work"size="" >
<option value="教师" selected>教师</option>
<option value="医生">医生</option>
<option value="律师">律师</option>
<option value="演员">演员</option>
<option value="厨师">厨师</option>
</select></td></tr>
<tr><td>工作年限:<input name="workingyear" type="range" min="1" step="1" max="20" value="3" onmouseover="jingguo()" ></td></tr>
<tr><td>请选择你的业余爱好:<br>
音乐<input type="checkbox" name="hobby" id="hobby1">
登山<input type="checkbox" name="hobby" id="hobby2">
游泳<input type="checkbox" name="hobby" id="hobby3">
阅读<input type="checkbox" name="hobby" id="hobby4">
打球<input type="checkbox" name="hobby" id="hobby5">
<br>
<input type="button" value = "全选" onclick = "checkall();">
<input type="button" value = "全不选" onclick = "clearall();">
</td></tr>
<tr><td>电子邮箱:<input name="eamil" type="email" placeholder="您的电子邮箱"></td></tr>
<tr><td>备注:<textarea name="textarea" cols="40" rows="6"></textarea></td></tr>
<tr><td>
<div style="line-height:2px;font-size:20px;">
<span style="padding:0px 0 0px 10px;float:left;display:block;line-height:5px;">请等待手机验证码发来</span>
<br><br><br><br><br><br>
<input type="text" id="txtCheckCode" style="width:10%; height:20px;float:left;" maxlength="4">
<img src="/Image/Index?r=1319928256" id="imagecode" style="padding:0px 0 0px 10px;float:left;" alt="验证码"> <a href="javascript:void(0);" id="seeagain" style="display:block;float:left;line-height:22px;margin-left:5px;">看不清</a>
</div>
</td></tr>
<tr><td>
<input type="submit" name="submit" value="提交">
<input type="reset" name="submit2" value="重置">
</td></tr>
</table>
</form>
</body>
</html>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>个人注册页面</title>
</head>
<style type="text/css">
<!--
body{font-family:"新宋体";background-color:#ff99cc;padding-top:40px}
table,tr,td{;font-family:"楷体";font-size:25px;padding-left:100px;}
h1{text-align:center;font-size:37px;color="#9900ff";}
-->
</style>
<script type="text/javascript">
function checkall(){
var hobby = document.getElementsByTagName("input");
for(var i=0;i<hobby.length;i++)
{
hobby[i].checked=true;
}
}
function clearall(){
var hobby = document.getElementsByName("hobby");
for(var i=0;i<hobby.length;i++)
{
hobby[i].checked=false;
}
}
function jingguo(){confirm("只需要拖动进度条到相应的位置就可以啦");}
</script>
<body>
<form name="forml" method="post" action="">
<table width="700" align="center" cellpadding="20" >
<h1>注册表</h1>
<tr><td>姓名:<input name="username" type="text" size="20" placeholder="您的姓名"></td></tr>
<tr><td>年龄:<input name="age" type="text" size="20" placeholder="您的年龄"></td></tr>
<tr><td>性别:<input name="sex" type="radio" value="男" checked>男
<input name="sex" type="radio" value="女">女</td></tr>
<tr><td>生日:<input name="birthday" type="date" value="" placeholder="您的生日"></td></tr>
<tr><td>职业:<select name="work"size="" >
<option value="教师" selected>教师</option>
<option value="医生">医生</option>
<option value="律师">律师</option>
<option value="演员">演员</option>
<option value="厨师">厨师</option>
</select></td></tr>
<tr><td>工作年限:<input name="workingyear" type="range" min="1" step="1" max="20" value="3" onmouseover="jingguo()" ></td></tr>
<tr><td>请选择你的业余爱好:<br>
音乐<input type="checkbox" name="hobby" id="hobby1">
登山<input type="checkbox" name="hobby" id="hobby2">
游泳<input type="checkbox" name="hobby" id="hobby3">
阅读<input type="checkbox" name="hobby" id="hobby4">
打球<input type="checkbox" name="hobby" id="hobby5">
<br>
<input type="button" value = "全选" onclick = "checkall();">
<input type="button" value = "全不选" onclick = "clearall();">
</td></tr>
<tr><td>电子邮箱:<input name="eamil" type="email" placeholder="您的电子邮箱"></td></tr>
<tr><td>备注:<textarea name="textarea" cols="40" rows="6"></textarea></td></tr>
<tr><td>
<div style="line-height:2px;font-size:20px;">
<span style="padding:0px 0 0px 10px;float:left;display:block;line-height:5px;">请等待手机验证码发来</span>
<br><br><br><br><br><br>
<input type="text" id="txtCheckCode" style="width:10%; height:20px;float:left;" maxlength="4">
<img src="/Image/Index?r=1319928256" id="imagecode" style="padding:0px 0 0px 10px;float:left;" alt="验证码"> <a href="javascript:void(0);" id="seeagain" style="display:block;float:left;line-height:22px;margin-left:5px;">看不清</a>
</div>
</td></tr>
<tr><td>
<input type="submit" name="submit" value="提交">
<input type="reset" name="submit2" value="重置">
</td></tr>
</table>
</form>
</body>
</html>
相关文章推荐
- Larry Smithr在TED演讲:为什么你干不成一番大事业
- android 显示flash视频播放器
- python 单例模式的实现
- 成为一名更好的程序员:如何阅读源代码
- 诗词—《泯稚》
- HDU_1009 (贪心问题)
- iOS_tableview 修改分割线位置(兼容IOS8)
- 本地json文件的编辑器,node-webkit开发的exe程序
- Sql Server Data compression 预估和选择,以及查看成功压缩的数据页
- c++编程必备啊..
- RVM 解决 Ruby 的版本问题
- 提示Android APP性能
- NSURLConnection 实现webView显示HTTPS页面
- LeetCode 37 Sudoku Solver(求解数独)(*)
- centos6.5使用JMX时远程连接不上的问题
- LintCode: First Position of Target
- string类的写时拷贝(Copy-On-Write)
- Exercises 3.17 输入一段文字到string类型的vector中,并将其改为大写
- Smash fear, learn anything 无所畏惧,学无止境-Tim Ferriss的Ted
- Android注释规范