1.javascript html 设计一个登录界面
2.用html代码编写一个简单的手机手机登陆界面
javascript html 设计一个登录界面
注册页面代码:<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<title>注册</title>
</head>
<body>
<form method="post" onsubmit="return false" id="form">
<input type="text" name="username" placeholder="用户名"><br>
<input type="password" name="password" placeholder="密码"><br>
<input type="password" name="rePassword" placeholder="再次输入密码"><br>
<input type="submit" onclick="register_user()" value="注册"><br>
</form>
<a href="login.html">去登录</a>
<script>
var localDB = openDatabase('localDB', '1.0', 'Test DB', 2 * * );
localDB.transaction(function (ts) {
ts.executeSql('CREATE TABLE IF NOT EXISTS user(username,password)')
});
function register_user() {
var username = document.getElementsByTagName("input")[0].value;
var password = document.getElementsByTagName("input")[1].value;
var rePassword = document.getElementsByTagName("input")[2].value;
if(password != rePassword)
{
alert("两次输入的密码不同,请重新输入");
}else
{
localDB.transaction(function(ts){
ts.executeSql("INSERT INTO user (username,登录登录cepc源码password) VALUES ('"+username+"','"+password+"');");
alert("注册成功");
});
}
}
</script>
</body>
</html>
登录页面代码:
<!DOCTYPE html><html lang="en">
<head>
<meta charset="UTF-8">
<title>登录</title>
</head>
<body>
<form onsubmit="return false" method="post">
<input type="text" placeholder="用户名"><br>
<input type="password" placeholder="密码"><br>
<input type="submit" value="登录" onclick="login()"><br>
</form>
<a href="register.html">去注册</a>
<script>
var localDB = openDatabase('localDB', '1.0', 'Test DB', 2 * * );
localDB.transaction(function (ts) {
ts.executeSql("SELECT * FROM user",[],function (tx, results) {
var len = results.rows.length;
if(len<=0)
{
localDB.transaction(function (ts) {
ts.executeSql('CREATE TABLE IF NOT EXISTS user(username,password)')
});
}
});
});
function login() {
var username = document.getElementsByTagName("input")[0].value;
var password = document.getElementsByTagName("input")[1].value;
localDB.transaction(function (ts) {
ts.executeSql("SELECT * FROM user WHERE username='"+username+"';",[],function (ts, res) {
if(res.rows.length<=0)
{
alert("登录失败,用户未注册");
}else if (password == res.rows[0].password)
{
alert("登录成功,界面按键a星源码三秒后跳转到百度");
setInterval(function () {
location.href = "";
},);
}else
{
alert("登录失败,密码错误");
}
});
})
}
</script>
</body>
</html>
以上代码使用了WEB SQL,源码页面家政android源码下载还请选择合适的手机手机unity枪抖动源码浏览器查看。
用html代码编写一个简单的登录登录获取设备mac源码登陆界面
<!DOCTYPE html><html lang="zh-CN"><head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>登录</title>
<link href="css/bootstrap.min.css" rel="stylesheet"></head><body><nav class="navbar navbar-default">
<div class="container-fluid">
<div class="navbar-header">
<a class="navbar-brand" href="./">jsp作业</a>
</div>
<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
<ul class="nav navbar-nav navbar-right">
<li><a href="login.html">登录</a></li>
</ul>
</div>
</div></nav><div class="container">
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4">
<form class="form-signin" target="submitFrame" method="post">
<h2 class="form-signin-heading">登录到jsp作业</h2>
<label for="inputEmail">Email</label>
<input type="email" id="inputEmail" class="form-control" placeholder="请输入Email" required autofocus><br>
<label for="inputPassword">密码</label>
<input type="password" id="inputPassword" class="form-control" placeholder="请输入密码" required>
<div class="checkbox">
<label>
<input type="checkbox" value="remember-me" checked="checked"> 记住密码 </label>
</div>
<button type="submit" class="btn btn-primary" id="btn-login">登录</button>
<a href="reg.html" class="btn btn-default">注册</a>
</form>
<iframe style="display: none;" name="submitFrame" src="about:blank"></iframe>
</div>
<div class="col-md-4">
</div>
</div>
<script src="js/jquery.min.js"></script></body></html>
2024-11-15 11:28
2024-11-15 11:02
2024-11-15 11:01
2024-11-15 10:49
2024-11-15 10:17
2024-11-15 09:43
2024-11-15 09:22
2024-11-15 09:02