1、如何製作需要用戶名和密碼才能登陸的網頁(注冊表單)
是要用asp。不僅是這樣啊。你還要有一個後台的資料庫,裡面存放著你的客戶的資料。所有注冊的資料都存放在資料庫里。當他登陸的時候如果資料庫里有他的資料就會登陸,如果沒有就要新注冊。把你的網頁連接資料庫。資料庫的作用不僅僅是實現用戶登錄。你可以有管理員管理等很多
2、HTML5網頁前端設計中如下圖表單的代碼怎麼寫?
下面是表單代碼,你直接再加屬性就可以了,表單用 table 寫比較簡單,div 太麻煩了;
<html xmlns=" http://www.dayinmandarin.com ">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>黑板</title>
</head>
<body>
<div style="width:500px;">
<h1 style="width:500px;height:50px;color:#2A8DF0;border-bottom:#2A8DF0 solid 3px; text-align:center;">用戶注冊頁面</h1>
<table cellpadding="0" cellspacing="10" style="margin:0 auto;">
<tr>
<td align="right" valign="top"><div>用戶名:</div></td>
<td><input style='width:250px' value='請輸入用戶名' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>密 碼:</div></td>
<td><input style='width:250px' value='請輸入密碼' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>確 認:</div></td>
<td><input style='width:250px' value='請再次輸入密碼' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>姓 名:</div></td>
<td><input style='width:250px' value='請輸入真實姓名' /></td>
</tr>
<tr>
<td align="right" valign="top"><div>郵 箱:</div></td>
<td><input style='width:250px' value='請輸入電子郵箱' /></td>
</tr>
</table>
<div align="center"><input style="width:100px;height:30px;text-align:center;line-height:30px;background:#2289F0;border:#2289F0;color:white;font-weight:bold;font-size:16px;" type="submit" value="提交注冊" /></div>
</div>
</body>
</html>
3、網頁設計的表單怎麼弄
以下是源代碼,輸入正確的密碼(www.chinaitz.com),跳轉到的網址為 http://www.chinaitz.com
復制以下源代碼,改名為 chinaitz.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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>www.chinaitz.com</title>
</head>
<body>
<form id="chinaitzform" name="chinaitzform" method="post" action="chinaitz.html">
<label>
<input type="password" name="password" id="password" />
</label>
<p>
<label>
<!-- input type="submit" name="button" id="button" value="提交" /-->
<input class="submit" value="提交" name="chinaitz" onclick="javascript:checkvalue();return false;" type="button">
</label>
</p>
<script LANGUAGE="JavaScript">
function checkvalue()
{
if(document.chinaitzform.password.value=="")
{
alert("密碼不能為空!");
return(false);
}
if(document.chinaitzform.password.value!="www.chinaitz.com")
{
alert("密碼輸入錯誤!");
return(false);
}
document.chinaitzform.submit();
return(window.open('http://www.chinaitz.com'));
}
</script>
</form>
</body>
</html>
==================================================================
4、運用HTML5新表單元素製作一個網頁,內容包括:用戶名輸入、密碼輸入、二次密碼確認、郵箱輸入、關鍵
<html>
<head>
<title></title>
</head>
<body>
<div>HTML各種輸入驗證</div>
用戶:<input id="uname" type="text" /><br />
密碼:<input id="pwd" type="password" /><br>
確認密碼:<input id="pwd1" type="password" /><br>
EMAIL:<input id="email" name="email" type="email" /><br>
<input id="load" value="登陸" type="button" onclick="check()" />
<script language="javascript">
window.onload = function ()
{
document.getElementById('uname').focus();
}
function check()
{
var uname=document.getElementById("uname").value;
var pwd=document.getElementById("pwd").value;
var pwd1=document.getElementById("pwd1").value;
var email=document.getElementById("email").value;
if(uname+pwd=="")
{
alert("用戶名和密碼不能為空");
}
else if(uname=="")
{
alert("用戶名不能為空");
}
else if(pwd=="")
{
alert("密碼不能為空");
}
else if(pwd1 != pwd)
{
alert("兩次密碼不一樣");
}
//
if(email=="")
{
alert("電子郵件不能為空");
return false;
}
else
{
reg=/^([a-zA-Z0-9]+[_|-|.]?)*[a-zA-Z0-9]+@([a-zA-Z0-9]+[_|-|.]?)*[a-zA-Z0-9]+.[a-zA-Z]{2,3}$/gi;
if(!reg.test(email))
{
alert("非法的電子郵件");
return false;
}
}
}
</script>
</body>
</html>
5、請教網頁製作高手,想在網頁上做一個用戶注冊和登錄的表單
<html > <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <script language="jscript"> function check(){ var name=myform.txtN.value; var pass = myform.txtP.value; if(name.length==""||pass.length==""){ alert("用戶名或密碼不能為空!"); return false; } if(pass.length<6||name.length<6){ alert("密碼或用戶名長度要位以上"); return false; } for(var i = 0;i<name.length;i++){ name=name.toLowerCase().charAt(i); if(!(name>='0'&&name<='9')&&!(name>='a'&&name<='z')){ alert("用戶名必須只能由數字和字母組成"); return false; } } return true; } </script> <title>css樣式特效</title> <style type="text/css"> table{ font-size:12px; } .mouseOverStyle{ background-image:url(img/excer/images1/freedl_1-2.jpg); border:0px; padding:0px; margin:0px; height:24; width:102; font-size:12px; } .mouseOver{ background-image:url(img\excer\images1\freedl_1-1.jpg); border:0px; margin:0px; padding:0px; height:24; width:102; font-size:12px; } .mouseOut{ ` background-image:url(img\excer\images1\freedl_1-2.jpg); border:0px; margin:0px; padding:0px; height:24; width:102; font-size:12px; } </style> </head> <body> <form name="myform" method="post" action="a.htm" onSubmit="return check()"> <table border="0" bgcolor="#F8F8F8" style="border-style:solid; border-width:1px;"> <tr> <td colspan="2"><img src="img/excer/images1/freeh1-n.jpg" alt="1" ></td> </tr> <tr> <td width="72"><label></label> <div align="right">用戶名:</div></td> <td width="240"><label> <input type="text" name="txtN" style="border-color='#00a8a8'" onMouseOver="this.style.borderColor='#ffa346';" onMouseOut="this.style.borderColor='#00a8a8'"> </label> <br>名字由字母和數字組成</td> </tr> <tr> <td><div align="right">密碼:</div></td> <td><label> <input type="password" name="txtP" style=" border-color:#00a8a8" onMouseOver="this.style.borderColor='#ffa346';" onMouseOut="this.style.borderColor='#00a8a8'" > </label> </td> </tr> <tr> <td> </td> <td><label>密碼長度6位以上</label></td> </tr> <tr> <td> </td> <td><label> <input type="submit" name="Submit" value=" 登錄 " class="mouseOverStyle" onMouseOver="this.className='mouseOver'" onMouseOut="this.className='mouseOut'" > </label> </td> </tr> </table> </form> </body> </html>
6、網頁製作,表單提交代碼,誰會?(在線等)
<html>
<head></head>
<body>
<table><tr><td>
<form action="new.html" action=post>
<input name="value" type="text" value="你要輸入的內容">
<input type=submit name=submit>
</form>
</td></tr>
</body></html>
new.html
<html>
<head></head>
<script type="text/javascript" language="javascript">
<!--
function GetQueryString(name)
{
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
var r = window.location.search.substr(1).match(reg);
if (r!=null) return unescape(r[2]); return null;
}
function timer(){
var value =GetQueryString("value");
document.getElementById("value").innerHTML = value;
}
-->
</script>
<body onload="window.setInterval('timer()');">
你輸入的內容是:<div id="value"></div>
</body>
</html>
基本上可以實現你的要求,但遇到中文會出現編碼問題,你到網上再查查!
7、網頁設計,form表單中的驗證用戶名和密碼
一般我們在做Form表單數據提交,建議彈出一個對話框增強交互性,還有現在比較好的用戶交互做法是非同步同輸來實現。