㈠ 如何在网页上制作一个简单的用户登录页面能发个代码给我吗
<table id="logon" height="92" cellspacing="0" cellpadding="0" width="180" border="0">
<form name="Form1" method="post" action="?act=login" id="Form1">
<tr>
<td valign="middle" align="center" width="48" height="20">帐 号:</td>
<td valign="middle" width="122">
<input name="UserName" id="TextName" type="text" class="input" onmouseover="this.style.backgroundColor='#ffffff'" onmouseout="this.style.backgroundColor='#f4f4f4'" maxlength="16" size="12" style="WIDTH: 110px; HEIGHT: 20px" /></td>
</tr>
<tr>
<td valign="middle" align="center" height="20">密 码:</td>
<td valign="middle">
<input name="UserPass" id="TextPassword" type="password" class="input" onmouseover="this.style.backgroundColor='#ffffff'" onmouseout="this.style.backgroundColor='#f4f4f4'" maxlength="16" size="13" TextMode="Password" style="WIDTH: 110px; HEIGHT: 20px" /></td>
</tr>
<tr valign="middle">
<td align="center" colspan="2" height="15"><input type="submit" value="提交" name="B1"> <input type="reset" value="重置" name="B2"><input type="hidden" value="login" name="act"></td>
</tr></form>
</table>
<%
if request("act")="login" then
username=request.form("username")
password=request.form("password")
if password = "123456" then
Response.Cookies("UserName")=UserName
Response.Write ("登陆成功")
end if
end if
%>
㈡ 如何使用JSP来实现百度的登录弹出框
使用JSP来实现网络的登录弹出框:
核心代码:
<html>
<head>
<title></title>
<script type="text/javascript">
function showLogin() {
var loginDiv = document.getElementById("loginDiv");
var zhezhao = document.getElementById("zhezhao");
var clientx = document.documentElement.clientWidth;
var clienty = document.documentElement.clientHeight;
var l_margin = (clientx - parseInt(loginDiv.style.width)) / 2;
var t_margin = (clienty - parseInt(loginDiv.style.height)-200) / 2
loginDiv.style.left = l_margin + "px";
loginDiv.style.top = t_margin +"px";
loginDiv.style.display = "block";
zhezhao.style.display = "block";
}
function hidLogin() {
var loginDiv = document.getElementById("loginDiv");
var zhezhao = document.getElementById("zhezhao");
loginDiv.style.display = "none";
zhezhao.style.display = "none";
}
function titleMove() {
var moveable = true;
var loginDiv = document.getElementById("loginDiv");
//以下变量提前设置好 var clientX = window.event.clientX;
var clientY = window.event.clientY;
var moveTop = parseInt(loginDiv.style.top);
var moveLeft = parseInt(loginDiv.style.left);
document.onmousemove = function MouseMove() {
if (moveable) {
var y = moveTop + window.event.clientY - clientY;
var x = moveLeft + window.event.clientX - clientX;
if (x > 0 && y > 0) {
loginDiv.style.top = y + "px";
loginDiv.style.left = x + "px";
}
}
}
document.onmouseup = function Mouseup() {
moveable = false;
}
}
</script>
</head>
<body>
<!--Main start z-index:0-->
<div id="Main" style="position:absolute;z-index:0;">
<a href="javascript:showLogin()">登陆</a>
</div>
<!--Main start z-index:0-->
<!--loginDiv start :z-index:2-->
<div id="loginDiv" style="background-color:white;width:300px;height:150px;border:1px solid blue;z-index:2;display:none;position:absolute;border-top:none">
<div onmousedown="titleMove()" id="login_title" style="width:300px;height:25px;background-color:Blue;border:1px solid silver;border-left:none;border-right:none">
<!--<img src="../images/close.jpg" style="float:right" onclick="hidLogin()"/>-->
<a href="javascript:hidLogin()" style="float:right;text-decoration:none;color:white;margin-right:2px;font-size:20px">×</a>
</div>
<table style="clear:right;width:298px;height:115px;text-align:right;margin-top:10px;">
<tr><td>用户名:</td><td><input type="text" style="width:180px;" /></td><td> </td></tr>
<tr><td>密码:</td><td><input type="text" style="width:180px;" /></td><td> </td></tr>
<tr><td><br /></td><td></td></tr>
</table>
</div>
<!--loginDiv end :z-index:2-->
<!--zhezhao start: z-index:1-->
<div id="zhezhao" style="position:absolute;z-index:1;width:100%;height:100%;background-color:silver;display:none;opacity:.5;">
<!--zhezhao end-->
</div>
</body>
</html>
运行效果:
㈢ 编百度首页的代码
这个对着网络首页,,然后Ctrl+s,保存所有html文件到本地,,然后改改就行,或者右键查看网页源代码,,,网页另存为。。仅供学习使用。
㈣ 用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>
㈤ 登陆界面代码(非web)怎么编写(注:用c#语言编写)
楼上的没看清楚吗?(非web) 说的就是winfrom!
就进入一个新的窗口,而原来的窗口消失
static void Main()
{
Application.EnableVisualStyles();
Application.(false);
Login login = new Login();
if (login.ShowDialog() == DialogResult.OK)
{
login.Close();
Application.Run(new mainForm());
}
}
后面你自己写!
㈥ html网页设计:一个简单的登录界面代码!
JS验证
function yanZheng()
{
//***************会员名**************
if(form1.name.value.length==0)
{
alert("会员名不能为空");
return;
}
for(i=0;i<form1.name.value.length;i++)
{
if(!(form1.name.value.charAt(i)>='a'&&form1.name.value.charAt(i)<='z'||form1.name.value.charAt(i)>='A'&&form1.name.value.charAt(i)<='Z'))
{
alert("非法字符");
return;
}
}
if(form1.name.value.length<5)
{
alert("字符过短");
return;
}
㈦ 用ASP代码如何编写登录页面
User_LoginCheck.asp代码: <!--#include file="Include/cnOpen.asp" --> <p align="center" class="logo"> <% dim User,Pwd set User = request.Form("User_Name") set Pwd = request.Form("User_Pwd") if User = "" or Pwd = "" then Response.Write "<p align=center><font color=red>用户名或密码不能为空!请返回后重新输入</font></p>" end if %> </p> <% dim rs set rs = Server.CreateObject("adodb.recordset") rs.open "select * from User_Info where User_Name = '"&User&"' and User_Pwd = '"&Pwd&"'",cn if not rs.eof then Response.Write "<p align=center><font color=red>登录成功!</font></p>" session("User_Name")=trim(request.form("User_Name")) Response.Redirect("Index.asp") else Response.Write "<p align=center><font color=red>登陆失败!</font></p>" end if %> <% rs.close set rs = nothing %> <!--#include file="Include/cnClose.asp" --> <!--#include file="User_Login.asp" --> 这个程序比较简单,就是数据库连接~若用户名或密码为空则提示错误信息~否则打开数据库中的表User_Info 验证用户名和密码,错误则提示错误信息~正确则跳转至Index.asp页面并用session记录用户名~释放数据库连接 User_Login.asp是用户登录页面,里面只有两个文本框用于用户输入用户名和密码传递给这个User_LoginCheck.asp页面~ 你可以在这上面加入过滤空格、特殊字符串等函数,更完善一些~ 希望可以帮到你~
㈧ 如何写网页登陆界面的代码
这个是处理表单的页面,其实如果按照你说的,只有一个用户名的话,那就不用数据库咯。满简单的。
<%
AdminName=request("AdminName")
Password=request("Password")
if AdminName<>"制作" then
response.write"<SCRIPT language=JavaScript>alert('用户名不正确!');"
response.write"javascript:history.go(-1)</SCRIPT>"
else
response.redirect"qindayuan.com/vcckxp/215165.htm"
end if
if Password<>"0123456789" then
response.write"<SCRIPT language=JavaScript>alert('密码错误!');"
response.write"javascript:history.go(-1)</SCRIPT>"
else
response.redirect"qindayuan.com/vcckxp/215165.htm"
end if
%>
这样子你试试看,表单的用户名文本框name用AdminName表示,密码用password。试试看吧,如果你觉得这代码不好的话,不用评答案也行,我只是给你一个参考。
㈨ 登录界面代码怎么写
步骤一:登录页面总共分为四个部分。
第一部分:DIV整体布局。
第二部分:登录标题部分。
第三部分:用户名和密码输入框。
第四部分:网页布局样式。
㈩ 怎么制作一个登陆界面的网页代码
if(a==111 && b==123)
{
alert("登录成功!");
disp=open("http://www.hao123.com","result");
return false;
}
alert语句后面句改成 location.href='你希望跳转到的页面地址';