java写登录界面的代码 java登录界面代码简单( 三 )


color: white;
text-indent: 2em;
float: left;
}
#top_bottom_right{
width: 660px;
height: 30px;
line-height: 30px;
font-size: 12px;
color: blueviolet;
text-align: center;
float: right;
background: lightskyblue;
}
#content{
width: 1000px;
height: 600px;
margin: 0 auto;
background:#587FBA;
}
#content#text{
width: 1000px;
height: 50px;
line-height: 50px;
padding-top: 100px;
font-size: 36px;
font-family:"楷体";
font-weight: bold;
text-align: center;
}
#content#login{
width: 480px;
height: 210px;
margin-top: 20px;
margin-left: 260px;
background: #85A0CB;
}
#content#loginimg{
float: left;
}
#content#login#select{
width: 305px;
height: 210px;
float: right;
}
#content#login#selectdiv{
width: 230;
height: 30px;
margin-left: 30px;
}
#content#login#select#d1{
margin-top:30px;
margin-bottom: 3px;
}
#content#login#selectp{
font-size: 14px;
margin-left: 95px;
}
#bottom{
width: 1000px;
height: 35px;
line-height: 35px;
margin: 0 auto;
background: deepskyblue;
text-align: center;
color: white;
}
/style
/head
body
div id="top"
div id="top_top"
div id="top_top_left"
img src="/images/defaultpic.gif"先锋图书馆系统管理平台/label
/div
/div
div id="top_bottom"
div id="top_bottom_left"当前位置 : 首页系统管理登录/div
div id="top_bottom_right"当前时间 : label id="lable"/label/div
/div
/div
div id="content"
div id="text"欢迎登录先锋图书馆管理系统/div
div id="login"
img src="/images/defaultpic.gif"/
form id="select"
div id="d1"用户名: nbsp;nbsp;input type="text" //div
div密nbsp; 码: nbsp;nbsp;input type="password" //div
p
input type="radio" name="user" value="https://www.04ip.com/post/read"/读者nbsp;nbsp;nbsp;nbsp;
input type="radio" name="user" value="https://www.04ip.com/post/admin"/管理员
/pbr/
p
input type="button" value="https://www.04ip.com/post/确定" style="width: 50px;" onclick="put()"/nbsp;nbsp;nbsp;nbsp;
input type="reset" value="https://www.04ip.com/post/重置" style="width: 50px;"/
/p
/form
/div
/div
div id="bottom"欣欣科技有限公司版权所有/div
/body
script type="text/javascript" src="/images/defaultpic.gif"/script
script type="text/javascript" src="/images/defaultpic.gif"/script
script
//验证用户名和密码
function put(){
var d = $("#selectdivinput");//获取用户名和密码
var name = d[0].value;
var pass = d[1].value;
var user = null;
var r = document.getElementsByName("user");//获取用户类型
for(i=0;ir.length;i++){
if(r[i].checked){
user=r[i].value;
}
}
//console.log(name + "," +pass + "," +user);//输出测试
if(user==null){
window.alert("请选择用户类型!");
}else if(user=="admin"name!="admin"){
window.alter("用户名错误!");
}else if(user=="admin"name=="admin"pass!="123456"){
window.alert("密码错误!");
}else if(name=="admin"pass=="123456"user=="admin"){
window.location.href="https://www.04ip.com/post/work_02_welcome.html";//在js中在本页面中打开新链接
}else{
window.alert("用户名错误");
}
}
/script
/html
求JAVA实现用户登录界面代码?你要先学会截图哦,你发的看不清楚,重新写了一个你参考参考!

推荐阅读