1、網頁製作中登陸界面設計代碼
<%@language=vbscript codepage=936 %>
<%
option explicit
'強制瀏覽器重新訪問伺服器下載頁面,而不是從緩存讀取頁面
Response.Buffer = True
Response.Expires = -1
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
'主要是使隨機出現的圖片數字隨機
%>
<html>
<head>
<title>管理員登錄</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Admin_Style.css">
<script language=javascript>
function SetFocus()
{
if (document.Login.UserName.value=="")
document.Login.UserName.focus();
else
document.Login.UserName.select();
}
function CheckForm()
{
if(document.Login.UserName.value=="")
{
alert("請輸入用戶名!");
document.Login.UserName.focus();
return false;
}
if(document.Login.Password.value == "")
{
alert("請輸入密碼!");
document.Login.Password.focus();
return false;
}
//if (document.Login.CheckCode.value==""){
// alert ("請輸入您的驗證碼!");
// document.Login.CheckCode.focus();
// return(false);
}
}
</script>
</head>
<body onLoad="SetFocus();">
<p> </p>
<form name="Login" action="Admin_ChkLogin.asp" method="post" target="_parent" onSubmit="return CheckForm();">
<table width="300" border="0" align="center" cellpadding="5" cellspacing="0" class="border" >
<tr class="title">
<td colspan="2" align="center"> <strong>管理員登錄</strong></td>
</tr>
<tr>
<td height="120" colspan="2" class="tdbg">
<table width="250" border="0" cellspacing="8" cellpadding="0" align="center">
<tr>
<td align="right">用戶名稱:</td>
<td><input name="UserName" type="text" id="UserName2" size="23" maxlength="20"></td>
</tr>
<tr>
<td align="right">用戶密碼:</td>
<td><input name="Password" type="password" size="23" maxlength="20"></td>
</tr>
<tr>
<td align="right">驗 證 碼:</td>
<td><input name="CheckCode" size="15" maxlength="6">
1109 </td>
</tr>
<tr>
<td colspan="2"> <div align="center">
<input type="submit" name="Submit" value=" 確認 ">
<input name="reset" type="reset" id="reset" value=" 清除 ">
<br>
</div></td>
</tr>
</table>
</td>
</tr>
</table>
<p align="center">後台管理頁面需要屏幕解析度為 <font color="#FF0000"><strong>1024*768</strong></font>
或以上才能達到最佳瀏覽效果!<br>
需要瀏覽器為<strong><font color="#FF0000"> </font></strong><font color="#FF0000"><strong>IE5.5</strong></font>
或以上版本才能正常運行!!!</p>
</form>
</body>
</html>
2、HTML網頁設計:一個簡單的登錄界面可以連接到資料庫記錄的代碼
如下參考:
1.首先,在您的計算機桌面上創建一個新文件夾,然後在該文件夾中創建一個新的文本文檔。
2.然後用記事本雙擊打開文本文檔,如下圖所示,然後編寫一個簡單的HTML代碼。
3.點擊「另存為」功能選項,顯示默認的「另存為」代碼為ANSI。
4.我們將把編碼和文件名更改回圖中所示的圖像並保存它。
5.然後回到新創建的文件夾,找到一個額外的HTML文件。
6.最後,使用瀏覽器打開HTML文件。結果如圖所示。
3、網頁設計中用戶登陸設計時怎樣與資料庫連接?
這樣:
一個資料庫,表名為login,假設為Access資料庫,內有name,pw兩個欄位。
一個登陸頁面:login.asp
一個檢驗頁面:check.asp
login.asp部分代碼(省略html代碼,只列部分關鍵代碼,不會的可發送消息給我):
<form method="post" action="info.asp">
<input type="type" name="name">
<input type="password" name="pw">
</form>
check.asp部分代碼:
<%
dim name,pw
name=trim(request("name"))
pw=trim(request("pw"))
if name="" or pw="" then
response.Write "<script language='javascript'>window.confirm('對不起,用戶名或密碼均不能為空!');</script>"
response.Write "<script language='javascript'>parent.window.history.go(-1);</script>"
else
set rs=server.CreateObject("adodb.recordset")
sql="select * from info where name='"&name&"' and pw='"&pw&"'"
rs.open sql,conn,1,1
if rs.recordcount=0 then
response.Write "<script language='javascript'>window.confirm('對不起,用戶名或密碼錯誤,請重新登陸!');</script>"
response.Write "<script language='javascript'>parent.window.history.go(-1);</script>"
else
response.Write "<script language='javascript'>alert('登陸成功!');</script>"
response.Write "location.href='admin.asp';" ''admin.asp為登陸成功後轉向的頁面
end if
end if
%>
4、javascript html 設計一個登錄界面
注冊頁面代碼:
登錄頁面代碼:
以上代碼使用了WEB SQL,還請選擇合適的瀏覽器查看。
5、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>
6、如何用css div 設計登陸界面
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>無標題文檔</title>
<style type="text/css">
.title{font-family: verdana, tahoma, sans-serif;FONT-SIZE: 10px;font-weight:bold}
.grey{FONT-SIZE: 12px;color:#666666}
.orange {font-family: verdana, tahoma, sans-serif;font-size:10px;color:#FF6600}
.orange A:link {font-family: verdana, tahoma, sans-serif;font-size:10px;color:#FF6600;text-decoration:underline}
.orange A:visited {font-family: verdana, tahoma, sans-serif;font-size:10px;color:#FF6600;text-decoration:underline}
.orange A:hover {font-family: verdana, tahoma, sans-serif;font-size:10px;color:#FF6600;text-decoration:underline}
.orange A:active {font-family: verdana, tahoma, sans-serif;font-size:10px;color:#FF6600;text-decoration:underline}
textarea, input, select{
background: #FFFFFF;
border: 1px solid #CCCCCC;
color: #000000;
font-family: verdana, tahoma, sans-serif;
font-size: 0.95em;}
.username{
background-image:url(images/username.gif);
background-position: 1px 1px;
background-repeat:no-repeat;
padding-left:20px;
height:20px;
FONT-SIZE: 12px;}
.password{
background-image:url(images/password.gif);
background-position: 1px 1px;
background-repeat:no-repeat;
padding-left:20px;
height:20px;
FONT-SIZE: 12px;}
</style>
</head>
<body>
<table width="208" border="0" align="center" cellpadding="5" cellspacing="0">
<tr>
<td bgcolor="#F4F4F4" class="title">+ LOGIN</td>
</tr>
<tr>
<td class="grey"><img src="images/warning.gif" width="16" height="16" align="absmiddle"> 請輸入登陸的用戶和密碼</td>
</tr>
<tr>
<td class="title">Username</td>
</tr>
<tr>
<td><input name="Username" type="text" class="username" size="30"></td>
</tr>
<tr>
<td></td>
</tr>
<tr>
<td class="title">Password</td>
</tr>
<tr>
<td><input name="Password" type="password" class="password" size="30"></td>
</tr>
<tr>
<td class="orange"><a href="#">Get your Password ? </a></td>
</tr>
<tr>
<td align="right"><img src="images/loginin.gif" width="70" height="21"></td>
</tr>
</table>
<p> </p>
</body>
</html>
<script language=javascript ></script>
註:loginin.gif、password.gif、username.gif、warning.gif已經上傳了圖片loginin.gif,你自己下載一下,其他三張也就是裝飾用的
7、網頁設計的登陸界面問題
CSS是一種方法,Macromedia Dreamweaver 8做也可以,用布局頁面來繪製表格的位置你想放哪就放哪很隨意的專!通屬過表格的布局你的問題就很好解決了如果你不會用的話這有布局頁面教程希望可以幫到你http://www.pqshow.com/index/dw.html
在第二章里。。。。。
8、我要設計一個網站~~現在做一個登陸頁面~~怎樣使登陸頁面與SQL資料庫相連~~
這個問題相當的...基礎啊,不過要教會一頁字都寫不完。建議去搜索下關鍵字「內jdbc」或者「linq」的相關教程容。jdbc是通過代碼直接連接資料庫。linq是vs2008以後自帶的功能,可以在vs里建立資料庫連接dbml文件,通過linq語句快速查詢。你的問題就是登陸窗口輸入用戶名密碼,在提交頁面將用戶名密碼與資料庫中的數據進行對比,看一個簡單的視頻就能解決
9、怎麼設計WEB登錄頁面,讓頁面不平庸
1,先分析網站的行業的性質。
2,根據行業設定主色調。
3,多採用些透明度。大氣美觀。
10、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>
<script>
function r()
{
var username=document.getElementById("username");
var pass=document.getElementById("password");
if(username.value=="")
{
alert("請輸入用戶名");
username.focus();
return;
}
if(pass.value=="")
{
alert("請輸入密碼");
return;
}
return true;
}
</script>
</head>
<body>
<form>
<table width="350" bgcolor="#ccffcc" style="border-color" border="1">
<tr align=center>
<td>用戶名</td><td><input type="text" name="username" id="username"></td>
</tr>
<tr align=center><td>密 碼</td><td><input type="password" name="password" id="password"></td></tr>
<tr align=center><td>驗證碼</td><td><input type="text" name="yanzheng"></td></tr>
<tr align=center><td colspan="2"><input type="button" value="登 錄" onclick="r();"/> <input type="reset" value="重 置"/></td></tr>
</table>
</form>
</body>
</html>