A. 如何用html5+ css div制作一个简单的登录界面
1、按照正常的思路,布局就是div布局,写一个固定下来,作为模板,在每次获取数据的时候使用功能代码绑定数据到布局上面,自动生成页面内容就可以了。
拆分出单个模板来,很明显每项都是一样的
就这个样式写div+css不会吗?
两层div 的嵌套,里面布局排文本标签,image标签就可以了,绑定id填数据,或者遍历填数据。
简单布局是一种,再就是
这种
B. html登陆界面代码
实现这个功能要两个网页,一个是前台静态网页,用两个文本框分别为t1,内t2,一个按容钮active后面写上你要跳转的后台网页的名称如"houtai.asp"
以下是houtai.asp的代码
<%
dim
a,b
a=request.from("t1")
b=request.from("t2")
if
a<>admin
then
response.write
"用户名错误"
else
if
b<> 123456
then
response.write
"密码错误"
else
response.redirect
"你要转到的主页.asp"
end
if
end
if
%>
C. html网页设计:一个简单的登录界面代码!
<input
type='button'
text='登陆'
onclick='return
checknull()'>你说抄的要能识别是否输入了用户名和密码!需要用脚本来验证
<script>
function
checknull()
{
var
a=document.getElementById('用户名文本框ID').text;
var
b=document.getElementById('密码文本框ID').text;
if(a.length>0&&b.length)
return
true;
else
return
false;
}
<script>
D. 用html代码编写一个简单的登陆界面
<!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>
E. 这个首页的html5网站设计代码(尤其是头部那登录注册代码怎么写)
首先先说一下HTML5的代码只是在原有的XHTML基础上增加了一些新的标签(还有一些新的特性,例如数据库和缓存等特性)
以下为此页面的结构代码:
<!doctypehtml>
<html>
<head>
<metacharset="utf-8">
<metaname="revised"content=""/>
<metaname="keywords"content=""/>
<metaname="description"content=""/>
<metaname="author"content=""/>
<metaname="robots"content="all"/>
<title>页面标题</title>
</head>
<body>
<header>
<div></div><!--登陆注册区域-->
</header><!--头部[html5新标签]-->
<nav></nav><!--导航[html5新标签]-->
<div></div><!--banner-->
<div></div><!--左上-->
<div></div><!--右上-->
<div></div><!--左下-->
<div></div><!--右下-->
<footer></footer><!--底部[html5新标签]-->
</body>
</html>
注:以上为页面的大的框架,相对用HTML5新的标签更合理的,全用上了新的带有语义标签。
另外多说一下,[注册登陆]这块在html5的新标签里面没有很合适的语义化的标签,所以依然采用原有的div标签为最合理。html5只是在原有的技术的基础上更细化了,咱在制作代码的过程中没必要必须用HTML5的代码,主要看是否合理,合理的为较合适的。
多说的:不管用XHTML还是HTML5写代码,结构(HTML5)与样式(CSS)尽量要分离!
希望能帮到你!
F. HTML5网页前端设计中如下图表单的代码怎么写
下面是表单代码,你直接再加属性就可以了,表单用 table 写比较简单,div 太麻烦了;
<html xmlns=" http://www.dayinmandarin.com ">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>黑板</title>
</head>
<body>
<div style="width:500px;">
<h1 style="width:500px;height:50px;color:#2A8DF0;border-bottom:#2A8DF0 solid 3px; text-align:center;">用户注册页面</h1>
<table cellpadding="0" cellspacing="10" style="margin:0 auto;">
<tr>
<td align="right" valign="top"><div>用户名:</div></td>
<td><input style='width:250px' value='请输入用户名' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>密 码:</div></td>
<td><input style='width:250px' value='请输入密码' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>确 认:</div></td>
<td><input style='width:250px' value='请再次输入密码' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>姓 名:</div></td>
<td><input style='width:250px' value='请输入真实姓名' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>邮 箱:</div></td>
<td><input style='width:250px' value='请输入电子邮箱' /></td>
</tr>
</table>
<div align="center"><input style="width:100px;height:30px;text-align:center;line-height:30px;background:#2289F0;border:#2289F0;color:white;font-weight:bold;font-size:16px;" type="submit" value="提交注册" /></div>
</div>
</body>
</html>
G. html5写这个注册页面怎么写啊
<!DOCTYPEhtml>
<html>
<head>
<metacharset="utf-8"/>
<metaname="viewport"content="width=device-width,initial-scale=1">
<title>Bootstrap4</title>
<linkrel="stylesheet"href="https://cdn.bootcss.com/bootstrap/4.0.0/css/bootstrap.min.css"
integrity="sha384-Gn5384xqQ1aoWXA+/dAiS6JXm"crossorigin="anonymous">
<linkrel="stylesheet"href="bootstrap-colorpicker/css/bootstrap-colorpicker.css">
<linkrel="stylesheet"href="bootstrap-datepicker/css/bootstrap-datetimepicker.min.css">
<styletype="text/css">
.main-box{
width:640px;
margin:40pxauto;
}
</style>
</head>
<body>
<divclass="main-box">
<form>
<divclass="form-grouprow">
<labelfor="name"class="col-sm-2col-form-label">用户名</label>
<divclass="col-sm-10">
<inputtype="text"class="form-control"id="name"placeholder="请输入用户名">
</div>
</div>
<divclass="form-grouprow">
<labelfor="pwd"class="col-sm-2col-form-label">密码</label>
<divclass="col-sm-10">
<inputtype="password"class="form-control"id="pwd"placeholder="请输入密码">
</div>
</div>
<divclass="form-grouprow">
<labelfor="pwd2"class="col-sm-2col-form-label">确认密码</label>
<divclass="col-sm-10">
<inputtype="password"class="form-control"id="pwd2"placeholder="请输入确认密码">
</div>
</div>
<divclass="form-grouprow">
<labelfor="area"class="col-sm-2col-form-label">区域</label>
<divclass="col-sm-10">
<selectclass="form-controlform-control-lg"id="area">
<option>四川省</option>
</select>
</div>
</div>
<fieldsetclass="form-group">
<divclass="row">
<legendclass="col-form-labelcol-sm-2pt-0">性别</legend>
<divclass="col-sm-10">
<divclass="form-checkform-check-inline">
<inputclass="form-check-input"type="radio"name="inlineRadioOptions"id="inlineRadio1"value="option1"
checked="true">
<labelclass="form-check-label"for="inlineRadio1">男</label>
</div>
<divclass="form-checkform-check-inline">
<inputclass="form-check-input"type="radio"name="inlineRadioOptions"id="inlineRadio2"value="option2">
<labelclass="form-check-label"for="inlineRadio2">女</label>
</div>
</div>
</div>
</fieldset>
<divclass="form-grouprow">
<labelfor="age"class="col-sm-2col-form-label">年龄</label>
<divclass="col-sm-10">
<inputtype="email"class="form-control"id="age"placeholder="请输入年龄">
</div>
</div>
<divclass="form-grouprow">
<labelfor="age"class="col-sm-2col-form-label">生日</label>
<divclass="col-sm-10">
<inputsize="16"type="text"value="2012-06-15"readonlyclass="form-controlform_datetime">
</div>
</div>
<divclass="form-grouprow">
<labelfor="phone"class="col-sm-2col-form-label">手机号</label>
<divclass="col-sm-10">
<inputtype="text"class="form-control"id="phone"placeholder="请输入手机号">
</div>
</div>
<divclass="form-grouprow">
<labelfor="phone"class="col-sm-2col-form-label">头像</label>
<divclass="col-sm-10">
<inputtype="file"class="form-control-file"id="exampleFormControlFile1">
</div>
</div>
<divclass="form-grouprow">
<labelfor="site"class="col-sm-2col-form-label">主页</label>
<divclass="col-sm-10">
<inputtype="text"class="form-control"id="site"placeholder="请输入主页">
</div>
</div>
<divclass="form-grouprow">
<labelfor="email"class="col-sm-2col-form-label">Email</label>
<divclass="col-sm-10">
<inputtype="email"class="form-control"id="email"placeholder="请输入Email">
</div>
</div>
<divclass="form-grouprow">
<labelclass="col-sm-2col-form-label">喜欢的颜色</label>
<divclass="col-sm-10">
<inputid="likeColor"type="text"class="form-control"value="#5367ce"/>
</div>
</div>
<divclass="form-grouprow">
<divclass="col-sm-2"></div>
<divclass="col-sm-10">
<divclass="form-check">
<inputclass="form-check-input"type="checkbox"value=""id="defaultCheck1">
<labelclass="form-check-label"for="defaultCheck1">
同意服务条款
</label>
</div>
</div>
</div>
<divclass="form-grouprow">
<divclass="col-sm-10">
<buttontype="submit"class="btnbtn-primary">注册</button>
<buttontype="submit"class="btn">取消</button>
</div>
</div>
</form>
</div>
<scriptsrc="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X++8abtTE1Pi6jizo"crossorigin="anonymous">
</script>
<scriptsrc="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-"crossorigin="anonymous">
</script>
<scriptsrc="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-/nJGzIxFDsf4x0xIM+B07jRM"crossorigin="anonymous">
</script>
<scriptsrc="bootstrap-colorpicker/js/bootstrap-colorpicker.js"></script>
<scriptsrc="bootstrap-datepicker/js/bootstrap-datetimepicker.min.js"></script>
<script>
$('#likeColor').colorpicker();
$(".form_datetime").datetimepicker({
format:'yyyy-mm-dd',
weekStart:1,
todayBtn:1,//今日日期按钮
autoclose:1,//自动关闭
todayHighlight:1,//高亮今日日期
startView:2,//从日期视图开始
minView:2,
forceParse:0
});
</script>
</body>
</html>
案例下载
H. html登录界面代码
<html>
<head>
<title>登录界面</title>
</head>
<body>
<h2>登录界面:</h2>
<form>
请输入你的用户名:<br>
<input type="text" /><br>
输入你的地址:<br>
<input type="text" /><br>
填上密码:<br>
<input type="text" /><br>
选择你的性别:版<br>
<input type="radio" value="男" name="sex"/>男
<input type="radio" value="女权" name="sex"/>女<br>
选择你的爱好:<br>
<input type="checkbox" vlaue="游泳" />游泳
<input type="checkbox" vlaue="旅游" />旅游
<input type="checkbox" vlaue="上网" />上网
<input type="checkbox" vlaue="新闻" />新闻<br>
<input type="submit" value="提交" />
<input type="reset" value="重填" />
</form>
</body>
</html>
I. html登陆界面代码
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title>用户登录</title>
<script language="javascript" type="text/javascript" >
function x(){
if((a.name.value=="admin")&&(a.password.value=="admin")){
session.setAttribute("name",name);
response.sendRedirect("index.html");
}else{
alert('登录失败,请输入正确的用户名和密码!');
a.name.focus();
return false;
}
}
</script>
<style type="text/css">
.imgsub{
height: 33px;
width: 154px;
margin-top: 10px;
margin-left: 50px;
background:transparent;
}
input[type="text"]
{
width:150px;
margin-top:10px;
font-family: Verdana, Arial;
background:transparent;
}
input[type="password"]
{
width:150px;
margin-top:10px;
font-family: Verdana, Arial;
background:transparent;
}
input[type="submit"]
{
width:60px;
margin-left:35px;
display:block;
}
body {background-image: url(qui.jpg);}
</style>
</head>
<body>
<center>
<h2>学生信息管理系统</h2>
</center>
<center><br>
<form name="a" method="post" action="index.html" onsubmit="return x()">
账号:<input name="name" value="" type="text" size="16" ><br>
密码:<input name="password" value="" type="password" size="17" > <br>
<br> <input type="submit" class="imgsub" value="登录">
</form>
</center>
</body>
</html>
用户名和密码都是admin
J. 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>
<title>3</title>
</head>
<body>
<div align="center">
<form action="" name="myform">
<table>
<tr>
<td>用户名:</td>
<td><input type="text" id="user" /></td>
</tr>
<tr>
<td>密 码:</td>
<td><input type="text" id="password" /></td>
</tr>
<tr>
<td>验证码:</td>
<td align="left"><input type="text" size="5" id="code" /></td>
</tr>
</table>
</form>
<table>
<tr>
<td>
<input type="submit" value="提交" onclick=myfun_submit() />
</td>
<td>
<input type="submit" value="重置" onclick=myfun_reset() />
</td>
</tr>
</table>
</div>
<script type="text/javascript">
function myfun_submit(){
var user_val = document.getElementById("user").value;
var password_val = document.getElementById("password").value;
if(user_val==""){
alert("用户名不能为空!!");
}else if(password_val==""){
alert("密码不能为空!!!");
}
}
function myfun_reset(){
document.getElementById("user").value = "";
document.getElementById("password").value = "";
document.getElementById("code").value = "";
}
</script>
</body>
</html>