1、jsp網頁設計 用戶名填寫完之後 在填寫下一項時 怎麼可以直接驗證用戶名填寫是否正確
<input id="username" />
<input id="password" />
<script language="javascript" type="text/javascript">
function check() {
if (document.getElementById('username').value == "") {
alert("用戶名不能為空!");
document.getElementById('username').focus();
return false;
}
if (document.getElementById('password').value == "") {
alert("密碼不能為空!");
document.getElementById('password').focus();
return false;
} else {
alert("提交成功");
return true;
}
}
</script>
2、網頁設計,輸入用戶名確認鍵自動跳轉頁面
<input type="button" name="確認抄鍵襲"value="確認鍵">
type不是提交類型,只是一個button,當然不能提交,應改成submit
改成這樣試試:
<input type="submit" name="確認鍵"value="確認鍵">
3、網頁中輸入密碼和用戶名的表單如何製作
提交界面代碼:
------------------------------------------------------
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<style type="text/css">
<!--
.STYLE1 {
font-size: large;
font-weight: bold;
font-family: "Courier New", Courier, monospace;
color: #FF0000;
}
-->
</style>
</head>
<body>
<form action="chuli.asp" method="post">
<table width="276" border="1" align="center">
<caption>
<span class="STYLE1">信息提交 </span>
</caption>
<tr>
<td width="61">姓名:</td>
<td width="199"><label>
<input type="text" name="username" id="username" />
</label></td>
</tr>
<tr>
<td>性別:</td>
<td><p>
<label>
<input type="radio" name="type" value="1" id="RadioGroup1_0" />
男</label>
<label>
<input type="radio" name="type" value="2" id="RadioGroup1_1" />
女</label>
</p></td>
</tr>
<tr>
<td>密碼:</td>
<td><label>
<input type="password" name="pass" id="pass" />
</label></td>
</tr>
<tr>
<td colspan="2"><div align="center">
<input type="submit" name="button" id="button" value="提交" />
<label>
<input type="reset" name="button2" id="button2" value="重置" />
</label></div></td>
</tr>
</table>
</form>
</body>
</html>
處理界面代碼:
---------------------------------------------------------
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>無標題文檔</title>
<%
username=request.Form("username")
sex=request.Form("type")
password=request.Form("pass")
if sex=1 then
sexname="男"
else
sexname="女"
end if
%>
</head>
<body>
<table width="241" border="1" align="center">
<caption>
信息提取
</caption>
<tr>
<td width="131">姓名:</td>
<td width="94"><% response.write username %></td>
</tr>
<tr>
<td>性別:</td>
<td><% response.write sexname %></td>
</tr>
<tr>
<td>密碼:</td>
<td><% response.write password %></td>
</tr>
</table>
<p align="center"><a href="cbc.html">返回</a></p>
</body>
</html>
----------------------------------------------------
第一個文件是HTML的,第二個文件是ASP的
4、在網頁製作中,填寫了用戶名和密碼後才可以跳轉到另外一個網頁要怎麼弄?
你用JavaScript寫一個if判斷檢測的方法,方法中需要驗證輸入框里的字元長度是多少。還要驗證用戶名和密碼,點擊登錄時,就可以調用該方法。
5、請問網頁製作用戶登錄界面用戶名和密碼怎麼做?謝謝。
前端開發,從模仿開始
各種登錄,驗證碼demo,先熟悉一批,在學會文本框輸入綁定以及關聯數據欄位加密,一步一步來
6、網頁設計,怎麼才能實現,當用戶未輸入數值時會彈出提示「你還沒有輸入,請輸入!」?幫忙修改完整好吧
<html>我糾結了下,這樣可以不?
7、網頁製作如何添加用戶登錄(用戶名登錄密碼那種)
樣式
html {
background-color: #E9EEF0
}
.wrapper {
margin: 140px auto;
width: 884px;
}
.loginBox {
background-color: #FEFEFE;
border: 1px solid #BfD6E1;
border-radius: 5px;
color: #444;
font: 14px 'Microsoft YaHei','微軟雅黑';
margin: 0 auto;
width: 388px
}
.loginBox .loginBoxCenter {
border-bottom: 1px solid #DDE0E8;
padding: 24px;
}
.loginBox .loginBoxCenter p {
margin-bottom: 10px
}
.loginBox .loginBoxButtons {
background-color: #F0F4F6;
border-top: 1px solid #FFF;
border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px;
line-height: 28px;
overflow: hidden;
padding: 20px 24px;
vertical-align: center;
}
.loginBox .loginInput {
border: 1px solid #D2D9dC;
border-radius: 2px;
color: #444;
font: 12px 'Microsoft YaHei','微軟雅黑';
padding: 8px 14px;
margin-bottom: 8px;
width: 310px;
}
.loginBox .loginInput:FOCUS {
border: 1px solid #B7D4EA;
box-shadow: 0 0 8px #B7D4EA;
}
.loginBox .loginBtn {
background-image: -moz-linear-gradient(to bottom, #B5DEF2, #85CFEE);
border: 1px solid #98CCE7;
border-radius: 20px;
box-shadow:inset rgba(255,255,255,0.6) 0 1px 1px, rgba(0,0,0,0.1) 0 1px 1px;
color: #FFF;
cursor: pointer;
float: right;
font: bold 13px Arial;
padding: 5px 14px;
}
.loginBox .loginBtn:HOVER {
background-image: -moz-linear-gradient(to top, #B5DEF2, #85CFEE);
}
.loginBox a.forgetLink {
color: #ABABAB;
cursor: pointer;
float: right;
font: 11px/20px Arial;
text-decoration: none;
vertical-align: middle;
}
.loginBox a.forgetLink:HOVER {
text-decoration: underline;
}
.loginBox input#remember {
vertical-align: middle;
}
.loginBox label[for="remember"] {
font: 11px Arial;
}
HTML代碼:
<div class="wrapper">
<form action="/chaos/EvilEmail.html" method="post" >
<div class="loginBox">
<div class="loginBoxCenter">
<p><label for="username">電子郵箱:</label></p>
<p><input type="email" id="email" name="email" class="loginInput" autofocus="autofocus" required="required" autocomplete="off" placeholder="請輸入電子郵箱" value="" /></p>
<p><label for="password">密碼:</label><a class="forgetLink" href="#">忘記密碼?</a></p>
<p><input type="password" id="password" name="password" class="loginInput" required="required" placeholder="請輸入密碼" value="" /></p>
</div>
<div class="loginBoxButtons">
<input id="remember" type="checkbox" name="remember" />
<label for="remember">記住登錄狀態</label>
<button class="loginBtn">登錄</button>
</div>
</div>
</form>
</div>
8、web製作網頁時,登錄的用戶名顯示在主頁上,當點擊用戶名時,想出現資料庫中該用戶的所有信息,該如何寫?
用get傳值,比如點擊用戶名:<a href=「#.php?id=1」>用戶名</a>
你可以把用戶id傳給另外一個頁面,在頁面上接收$_GET['id']
根據接收到的id,從資料庫查找該對應的用戶的所有信息
9、如何製作輸入用戶名及密碼才可以登陸的網頁
既然需來要判斷用戶名自和密碼來進行登錄操作,那麼必須用到資料庫。
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>