1、要設計成先登錄才能訪問這個html頁面,怎麼做
要有兩個頁面。
第一個頁面設置成賬號 , 密碼格式,用JS 獲取<input type="text" name="user" id="user">的值。JS獲取值就是var use = getElementById("user").value 你在判斷use跟不跟你設置的User值相不相等,想等的話就可以跳轉到里一個頁面了.密碼同樣可以這樣獲得。
關於跳轉的話,最簡單的就是<a href="路徑"></a>這是最簡單的跳轉。(不可取)
另外就是用JS 來控制了。
2、javascript html 設計一個登錄界面
注冊頁面代碼:
登錄頁面代碼:
以上代碼使用了WEB SQL,還請選擇合適的瀏覽器查看。
3、網頁設計裡面的用戶登錄怎麼弄
網頁設計的用戶登錄分前台和後台,前台屬於UI設計,後台屬於技術,你是問哪種呢
4、網頁設計如何設計登錄注冊框
<div class="Content_01" id="01_Title">·管理登陸</div>
<div class="DivContent" id="Content01">
<form id="form1" name="form1" method="POST" action="/xxzx/index.asp" onsubmit="return check()">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td width="25%" height="25" align="right">用戶名:</td>
<td><input name="Username" type="text" id="Username" size="20" /></td>
</tr>
<tr>
<td height="25" align="right">密 碼:</td>
<td><input name="psw" type="password" id="psw" size="21" /></td>
</tr>
<tr>
<td height="25" colspan="2" align="center"><input name="Submit" type="submit" class="smallInput" value="登 陸" />
<input name="Submit2" type="reset" class="smallInput" value="重 置" /></td>
</tr>
</table>
</form>
</div>
</div>
歡迎 登陸本站!<br>
5、我要設計一個網站,現在做一個登陸頁面,怎樣使登陸頁面與SQL資料庫相連?
最簡單的
string connString = ConfigurationManager.AppSettings["ConnectionString"]
string username=Request.QueryString["username"]
string sql="select username , password from user where username=username"
SqlConnection conn = new SqlConnection(connString);
SqlDataAdapter adapter = new SqlDataAdapter(sql, conn);
conn.Open();
DataSet ds = new DataSet();
adapter.Fill(ds);
if(ds.table[0].Rows[0]["username"])
{
Response.Write "登錄成功"
}
6、設計網頁教程誰有啊,麻煩給個,先謝了
我有。
7、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>