尋找生活小知識,讓美好生活更加便捷
當前位置:首頁 » 電腦辦公 » 代碼怎樣編寫百度登錄頁電腦版
擴展閱讀
怎樣用手機錄視頻慢動作 2025-06-11 19:35:07
怎樣清洗抽油煙機最簡單 2025-06-11 19:26:06

代碼怎樣編寫百度登錄頁電腦版

發布時間: 2022-05-31 22:52:06

㈠ 如何在網頁上製作一個簡單的用戶登錄頁面能發個代碼給我嗎

<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='你希望跳轉到的頁面地址';