<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
table {
width:50%;
height: 50%;
border:1px solid black;
padding: 2px;
margin : 5% auto ;
}
td{
border:1px solid black;
margin: 0;
}
</style>
</head>
<body>
<form action="http://127.0.0.1:8080/guoya-server/signUp" method="post">
<table >
<tr>
<td>用户名</td>
<td><input type="text" name="yonghu"></td>
</tr>
<tr>
<td>年龄</td>
<td><input type="number" name="nianling"></td>
</tr>
<tr>
<td>生日</td>
<td><input type="date" name="shengri"></td>
</tr>
<tr>
<td>头像</td>
<td><input type="file" name="touxiang"></td>
</tr>
<tr>
<td>密码</td>
<td><input type="password" name="mima"></td>
</tr>
<tr>
<td>性别</td>
<td><input type="radio" name="sex" value="0">男
<input type="radio" name="sex" value="1">女</td>
</tr>
<tr>
<td>爱好</td>
<td><input type="checkbox" name="aihao" value="0">吃
<input type="checkbox" name="aihao" value="1">喝
<input type="checkbox" name="aihao" value="2">拉
</td>
</tr>
<tr>
<td>学历</td>
<td><select id="学历">
<option>高中</option>
<option>大专</option>
<option>本科</option>
<option>博士</option>
</td>
</tr>
<tr>
<td>自我评价</td>
<td><textarea cols="30" rows="5" name="ziwopingjia">输入文字</textarea></td>
</td>
<tr>
<td>
<input type ="submit" name="chaxun" value="查询">
<input type="reset" name="chongzhi" value="重置">
</td>
</tr>
</table>
</form>
</body>
</html>
image.png
三个文件合
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>三合一</title>
<link rel="stylesheet" type="text/css" href="../../css/guoya.css">
<script src="../../js/guoya.js"></script>
</head>
<body>
<input type="text" id="user" value="未知">
<input type="button" value="你找谁?" onclick="text('test')">
<input type="button" id="id1" value="你找谁?" onclick="text('test1')">
<input type="button" value="你找谁?" onclick="text('test2')">
<input type="button" value="你找谁?" onclick="text('test3')">
</body>
</html>
CSS文件
input{
background-color: aqua;
}
#id1{
background-color: brown;
}
.class1{
background-color: midnightblue;
}
js文件
function text(content) {
var user=document.getElementById('user');
user.value='果芽';
alert(content);
}
image.png
Xpath语句
--按ID定位
//input[@id='kw']
--按文本定位
//a[contains(text(),"搜索")]
--按属性定位
//a[contains(@name,'tj_lo')]
网友评论