如何做到点击 用户名 自动跳转输入框中?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<form action="#" method="post">
<input type="hidden" name="id" value="123">
<label for="username"> 用户名:</label>
<input type="text" name="username" id="username"><br>
<label for="password">密码:</label>
<input type="password" name="password" id="password"><br>
性别:
<input type="radio" name="gender" value="男" id="男"><label for="男">男</label>
<input type="radio" name="gender" value="女" id="女"><label for="女">女</label>
<br>
城市:
<select name="city">
<option>北京</option>
<option>天津</option>
<option>上海</option>
<option>武汉</option>
<option>大连</option>
</select>
<br>
爱好:
<input type="checkbox" name="hobby" value="lvyou" id="lvyou"><label for="lvyou">旅游</label>
<input type="checkbox" name="hobby" value="movie" id="movie"><label for="movie">电影</label>
<input type="checkbox" name="hobby" value="game" id="game"><label for="game">游戏</label>
<br>
头像:
<input type="file">
<br>
<br>
个人描述:
<textarea></textarea>
<br>
<br>
<input type="submit" value="免费注册">
<input type="reset" value="重置">
<input type="button" value="这是一个按钮">
</form>
</body>
</html>
CSS
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<style>
div{
color: #b3d4fc;
}
#name{
color: red;
}
.cls{
color: blue;
}
</style>
</head>
<body>
<div>div1</div>
<div id="name">div2</div>
<div class="cls">div3</div>
<span class="cls">123</span>
</body>
</html>
LeetCode 每日一题
题号 1822
class Solution {
public int arraySign(int[] nums) {
boolean negative=false;
for(int x:nums){
if(x==0) return 0;
if(x<0) {
negative=!negative;
}
}
return negative?-1:1;
}
}