最近面试,人事给了个面试信息登记表页面让不用框架把面试框架还原出来。写的很简单,分享一下
效果图
思路:填表日期那个时间选择框,刚开始用的是input框中的date类型。但是这样的话再写placeholder就不会显示写入的文字了。解决办法是:
<input placeholder="请选择" type="text" onfocus="(this.type='date')" >
还有一种方法是,js引入WdatePicker
<script type="text/javascript" src="My97DatePicker/WdatePicker.js">
<input type="text" onfocus="WdatePicker()" placeholder="请选择"/>
面试单下边还有个表格,本来想的是在js中用for循环把表格做出来,然后嵌套进去input输入框。但我嫌麻烦,就直接简单粗暴用一堆td
代码如下:
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>应聘登记表</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" />
<meta name="format-detection" content="telephone=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<meta name="author" content="duanliang, duanliang920.com" />
<script type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<style>
body{font-size:62.5%;font-family:"Microsoft YaHei",Arial; overflow-x:hidden; overflow-y:auto;}
.headers{
width: 320px;
height: 60px;
/*垂直居中 */
vertical-align: middle;
/*水平居中*/
text-align: center;
background-color: deepskyblue;
}
input{
width: 320px;
height: 30px;
border-bottom: 1px solid;
border-top: 0px;
border-left: 0px;
border-right: 0px;
padding: 5px;
margin-top: 5px;
}
select{
width: 320px;
height: 30px;
border: 1px solid;
padding: 5px;
margin-top: 5px;
}
td,th{
border: 1px solid;
}
table{
width: 320px;
height:50px;
border-collapse: collapse;
border-spacing: 0;
border:1px ;
margin-top: 5px;
}
.must::before{
content: '* ';
color: red;
}
.sub{
background-color: blue;
}
</style>
</head>
<body>
<div class="headers">
<h2>xxx有限公司</h2>
<h2>应聘登记表</h2>
</div>
<div class="part">
<form action="" method="post">
<p>
<div class="must">应聘岗位</div>
<input type="text" placeholder="请输入" required="required" >
</p>
<p>
<div class="must">填表日期</div>
<!-- <input placeholder="请选择" class="textbox-n" type="text" onfocus="(this.type='date')" > -->
<input class="Wdate" type="text" onfocus="WdatePicker()" placeholder="请选择"/>
</p>
<p>
<div class="must">姓名</div>
<input type="text" placeholder="请输入">
</p>
<p>
<div class="must">性别</div>
<select name="sex">
<option disabled hidden selected>请选择</option>
<option value="">男</option>
<option value="">女</option>
</select>
</p>
<p>
<div class="must">出生日期</div>
<!-- <input placeholder="请选择" class="textbox-n" type="text" onfocus="(this.type='date')" id="date"><br> -->
<input class="Wdate" type="text" onfocus="WdatePicker()" placeholder="请选择"/>
</p>
<p>
<div class="must">民族</div>
<input type="text" placeholder="请输入">
</p>
<p>
<div class="must"> 政治面貌</div>
<input type="text" placeholder="请输入">
</p>
<p>
<div class="must">婚否</div>
<select name="sex">
<option disabled hidden selected>请选择</option>
<option value="">是</option>
<option value="">否</option>
</select>
</p>
<p>
<div class="must">健康状况</div>
<input type="text" placeholder="请输入">
</p>
<p>
<div class="must">籍贯(省、市)</div>
<input type="text" placeholder="请输入">
</p>
<p>
<div class="must">联系方式</div>
<input type="tel" placeholder="请输入">
</p>
<p>
<div class="must">电子邮箱</div>
<input type="email" placeholder="请输入">
</p>
<p>
<div class="must">目前是否在职</div>
<input type="text" ><br>
</p>
<p>
<div class="must">预计到岗时间</div>
<input class="Wdate" type="text" onfocus="WdatePicker()" placeholder="请选择"/>
</p>
<p>
<div class="must">教育经历(至少完整填写一行)</div>
<table >
<tr>
<th>时间</th>
<th>毕业院校</th>
<th>专业</th>
<th>详细情况</th>
</tr>
<tr>
<td contentEditable="true"></td>
<td contentEditable="true"></td>
<td contentEditable="true"></td>
<td contentEditable="true"></td>
</tr>
<tr>
<td contentEditable="true"></td>
<td contentEditable="true"></td>
<td contentEditable="true"></td>
<td contentEditable="true"></td>
</tr>
<tr>
<td contentEditable="true"></td>
<td contentEditable="true"></td>
<td contentEditable="true"></td>
<td contentEditable="true"></td>
</tr>
</table>
<p>
<div>个人荣誉</div>
<input type="text" placeholder="请输入">
</p>
<p>
<div>兴趣特长</div>
<input type="text" placeholder="请输入">
</p>
<p>
<div class="must">自我评价</div>
<input type="text" placeholder="请输入">
</p>
<p>
<input class="sub" type="submit" value="提交">
</p>
</form>
</div>
</body>
</html>
格式是我一边写一边捣鼓的,有很多重复的地方,懒得改了,就这样吧