㈠ asp程序實現簡單的注冊,登錄網頁的源代碼
1,(index.asp 用戶登陸頁面)
<!-- #include file="conn.asp" -->
<!-- blog.soowooo.cn 悠悠長假期 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>會員</title>
<style type="text/css">
<!--
body,td,th {
font-family: 宋體;
font-size: 14px;
}
-->
</style>
</head>
<body>
<center>
<p>會員注冊系統</p>
<form name="form1" method="post" action="login.asp">
<table width="34%" border="0">
<tr>
<td width="33%" height="30">用戶名:</td>
<td width="67%" height="30"><input name="username" type="text" id="username" size="15"></td>
</tr>
<tr>
<td height="30">密 碼:</td>
<td height="30"><input name="password" type="password" id="password" size="15"></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" name="Submit" value="確定">
<input type="reset" name="Submit" value="重置"></td>
</tr>
<tr>
<td colspan="2"><a href="reg.asp" target="_self">注冊</a></td>
</tr>
</table>
</form>
</center>
</body>
</html>
2,(login.asp 用戶數據處理文件)
<!-- #include file="conn.asp" -->
<%
'打開資料庫判斷用戶是否存在,info為表名,username為欄位名
set rsc=server.createobject("adodb.recordset")
sqlc="select * from info where username='"&request.Form("username")&"' and password='"&request.Form("password")&"'"
rsc.open sqlc,conn,1,1
session("username")=rsc("username")
session("password")=rsc("password")
session.Timeout=30
set rsc=nothing
response.Redirect("change.asp")
'如果用戶不存在,session("username")為空
%>
3,(change.asp 用戶信息修改頁面)
<!-- #include file="conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>修改</title>
<style type="text/css">
<!--
body,td,th {
font-size: 14px;
}
-->
</style></head>
<center>
<body>
<br>
<%
set rsc=server.createobject("adodb.recordset")
sqlc="select * from info where username='"&session("username")&"' and password='"&session("password")&"'"
rsc.open sqlc,conn,1,1
nr=rsc("password")
username=rsc("username")
password=rsc("password")
sex=rsc("sex")
qq=rsc("qq")
mail=rsc("mail")
add=rsc("add")
personalinfo=rsc("personalinfo")
vv=rsc("ntime")
set rsc=nothing
if nr="" then
response.Redirect("index.asp")
end if
if strcomp(nr,request.Form("password"))=0 then
response.Write("歡迎你!"&request.Form("username"))
response.Write("你是在"&vv&"注冊的")
session("username")=request.Form("username")
end if
if session("username")="" then
response.Redirect("index.asp")
end if
%>
<form name="form1" method="post" action="change.asp?ac=ch">
<table width="39%" height="105" border="0" >
<tr>
<td width="27%" height="30">用戶名:</td>
<td width="73%" height="30"><input name="username" type="text" id="username" value="<%=username%>">
*</td>
</tr>
<tr>
<td height="30">密 碼:</td>
<td height="30"><input name="password" type="text" id="password" value="<%=password%>">
*</td>
</tr>
<tr>
<td height="30">性 別:</td>
<td height="30"><input name="sex" type="text" id="sex" value="<%=sex%>"></td>
</tr>
<tr>
<td height="30">QQ:</td>
<td height="30"><input name="qq" type="text" id="qq" value="<%=qq%>"></td>
</tr>
<tr>
<td height="30">Mail:</td>
<td height="30"><input name="mail" type="text" id="mail" value="<%=mail%>"></td>
</tr>
<tr>
<td height="30">地 址:</td>
<td height="30"><input name="add" type="text" id="add" value="<%=add%>"></td>
</tr>
<tr>
<td>介紹</td>
<td><textarea name="personalinfo" cols="30" rows="6" id="personalinfo"><%=personalinfo%></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="修改">
<a href="change.asp?se=y" target="_self">退出系統</a></td>
<% if strcomp(request.QueryString("se"),"y")=0 then
session("username")=""
response.Redirect("index.asp")
end if
%>
</tr>
</table>
</form>
<%
if strcomp(request.QueryString("ac"),"ch")=0 then
set rs=server.createobject("adodb.recordset")
sql="select * from info where username='"&session("username")&"'"
rs.open sql,conn,1,3
rs("username")=request.Form("username")
rs("password")=request.Form("password")
rs("mail")=request.Form("mail")
rs("sex")=request.Form("sex")
rs("qq")=request.Form("qq")
rs("add")=request.Form("add")
rs("personalinfo")=request.Form("personalinfo")
rs.update
set rs=nothing
response.Write("修改完成!")
end if
%>
</body>
</center>
</html>
4,(reg.asp 新用戶注冊頁面)
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>用戶注冊</title>
<style type="text/css">
<!--
body,td,th {
font-family: 宋體;
font-size: 14px;
}
-->
</style>
</head>
<body>
<center>
用戶注冊<br>
<%
=request.QueryString("msg")
%>
<form name="form1" method="post" action="addnewdata.asp?ac=adser">
<table width="39%" height="105" border="0" >
<tr>
<td width="27%" height="30">用戶名:</td>
<td width="73%" height="30"><input name="username" type="text" id="username">
*</td>
</tr>
<tr>
<td height="30">密碼:</td>
<td height="30"><input name="password" type="password" id="password">
*</td>
</tr>
<tr>
<td height="30">確定密碼:</td>
<td height="30"><input name="password2" type="password" id="password2">
*</td>
</tr>
<tr>
<td height="30">性別:</td>
<td height="30"><input name="sex" type="text" id="sex"></td>
</tr>
<tr>
<td height="30">QQ:</td>
<td height="30"><input name="qq" type="text" id="qq"></td>
</tr>
<tr>
<td height="30">Mail:</td>
<td height="30"><input name="mail" type="text" id="mail"></td>
</tr>
<tr>
<td height="30">地址:</td>
<td height="30"><input name="add" type="text" id="add"></td>
</tr>
<tr>
<td>個人介紹</td>
<td><textarea name="personalinfo" cols="30" rows="6" id="personalinfo"></textarea></td>
</tr>
<tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交"></td>
</tr>
</table>
</form>
</center>
</body>
</html>
5,(addnewdata.asp 新用戶注冊數據處理文件)
<!-- #include file="conn.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>成功</title>
</head>
<body>
<%
ac=request.QueryString("ac")
msg="注冊錯誤信息"
if request.Form("username")="" then
msg=msg&"<br>"&"用戶名不能為空"
end if
if strcomp(cstr(request.Form("password")),cstr(request.Form("password2")))<>0 then
msg=msg&"<br>"&"兩次密碼輸入不同"
end if
if len(request.Form("password"))<6 then
msg=msg&"<br>"&"密碼太簡單"
end if
if strcomp(msg,"注冊錯誤信息")>0 then
response.Redirect("reg.asp?msg="&msg)
end if
if ac="adser" then
set rsc=server.createobject("adodb.recordset")
sql="select * from info where username='"&request.Form("username")&"'"
rsc.open sql,conn,1,1
ck=rsc("username")
set rsc=nothing
if ck<>"" then
msg=msg&"<br>"&"用戶名被人注冊"
response.Redirect("reg.asp?msg="&msg)
end if
dsql="select * from info where id is null"
set rs=server.createobject("adodb.recordset")
rs.open dsql,conn,1,3
rs.addnew
rs("username")=request.Form("username")
rs("password")=request.Form("password")
rs("mail")=request.Form("mail")
rs("sex")=request.Form("sex")
rs("qq")=request.Form("qq")
rs("add")=request.Form("add")
rs("personalinfo")=request.Form("personalinfo")
rs("ntime")=now
rs.update
set rs=nothing
%>
<center>
<a href="index.asp" target="_self">注冊成功,點擊登陸</a>
</center>
<%
end if
%>
</body>
</html>
6,(conn.asp 資料庫連接文件)
<%
'連接資料庫開始
dim conn,rs,sql
on error resume next
dbpath=server.mappath("userinfo.mdb")
set conn=server.createobject("adodb.connection")
conn.open "PROVIDER=Microsoft.jet.OLEDB.4.0;data source="
'創建記錄對象
set rs=server.createobject("adodb.recordset")
%>
7,(userinfo.mdb ACCESS 資料庫)
在ACCESS中建一個表,然後在這個表中建立欄位名稱
表名:info
欄位名稱 數據類型
id 自動編號
username 文本
password 文本
sex 文本
quest 文本
qq 文本
mail 文本
personalinfo 文本
ntime 文本
㈡ 有沒有類似易企秀這樣的H5頁面製作工具源碼
一般H5頁面製作工具的源碼是不開源的,市面上有一些簡單的,不過框架老舊,功能簡陋,沒有迭代優化,建議樓主到意派Epub360學一些專業的h5製作效果~
㈢ 動態html頁面。用html實現注冊和登錄的一些問題。
登錄頁面 login.html
<!doctypehtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<title>login</title>
<script>
window.addEventListener('load',function(){
varform=document.forms[0];
form.addEventListener('submit',function(e){
e.preventDefault();
varuserName=form.userName.value;
varpwd=form.pwd.value;
varuserInfo=JSON.parse(localStorage.getItem(userName));
if(userInfo&&userInfo.pwd===pwd)
returnalert('登錄成功!');
alert('登錄失敗請先注冊!');
});
document.getElementsByTagName('button')[0].addEventListener('click',function(e){
e.preventDefault();
location.href='regist.html';
});
});
</script>
</head>
<body>
<formaction="#">
<inputname="userName"type="text"placeholder="賬戶名"required>
<inputname="pwd"type="password"placeholder="密碼"required>
<inputtype="submit"value="登錄">
<button>注冊</button>
</form>
</body>
</html>
注冊頁面 regist.html
<!doctypehtml>
<htmllang="en">
<head>
<metacharset="UTF-8">
<title>regist</title>
<script>
window.addEventListener('load',function(){
varform=document.forms[0];
vargetUserInfo=function(){
varvalue={};
for(vari=0,len=form.elements.length;i<len;i++){
varel=form.elements[i];
if(/text|password/.test(el.type)){
value[el.name]=el.value;
}
}
returnvalue;
};
form.addEventListener('submit',function(e){
e.preventDefault();
varuserInfo=getUserInfo();
localStorage.setItem(userInfo.userName,JSON.stringify(userInfo));
alert('注冊成功!');
});
document.getElementsByTagName('button')[0].addEventListener('click',function(e){
e.preventDefault();
varvalue=getUserInfo();
varout=[];
for(varnameinvalue)
out.push(name+'='+value[name]);
alert(out.join(','));
});
});
</script>
</head>
<body>
<formaction="#">
<inputname="userName"type="text"placeholder="賬戶名"required>
<inputname="pwd"type="password"placeholder="密碼"required>
<inputname="confirmPwd"type="password"placeholder="確認密碼"required>
<inputtype="submit"value="注冊">
<button>驗證</button>
</form>
</body>
</html>
㈣ html怎麼做登錄注冊頁面
<form action = "a.html" method = "post">
用戶名:<input type = "text" name = "username" id = "username">
<br>
密碼:<input type = "password" name = "password" id = "password">
<br>
<input type = "submit" id = "submit" value = "登錄">
</form>
㈤ H5頁面怎麼做
在網路上搜索H5製作工具,下面會出現很多的H5頁面製作工具,選一個簡單好用的。
點擊進入到製作工具的官網,點擊注冊登錄。
登錄上官網以後,在頁面中移動滑鼠到「H5管理」,出現兩個選項,點擊「新建H5」。
新建H5後,系統會提示選擇豎屏或者橫屏,一般都是在手機端瀏覽,所以選擇豎屏。
選擇完後,會出現一個空白模板,需要把之前准備好的圖片、文字還有音樂放進去。
把圖片、文字和音樂放進去即可以個人的審美觀來進行動畫、特效等等的設置,點擊下方的按鈕,刷新預覽效果。
㈥ 注冊頁面html中的登錄按鈕代碼
<input type="button" name="submit" value="Log in" class="left" onclick="OnSubmits()" />
㈦ 求一用php寫的注冊和登錄頁面代碼
reg.php文件
<?php
header("Content-type:text/html;charset=utf-8");
if($_POST){
$dsn = 'mysql:dbname=1104javab;host=127.0.0.1';
$user = 'root';
$password = '';
try{
$pdo = new pdo($dsn,$user,$password,array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'')
);
}catch(Exception $e){
echo '錯誤'.$e->getmessage();
}
$name = $_POST['name'];
$pwd = md5($_POST['pwd']);
$sql = "insert into 表 (username,password) values ('$name','$pwd')";
$exec = $pdo->query($sql);
if($exec){
echo "<script>alert('成功');location.href='reg.html'</script>";
}else{
echo "<script>alert('失敗');location.href='reg.html'</script>";
}
}
?>
reg.html文件
<form action='reg.php' method='post'>
用戶名:<input type='text' name='name'>
密碼:<input type='password' name='pwd'>
<input type='submit' value='submit'>
</form>
login.html文件
<form action='reg.php' method='post'>
用戶名:<input type='text' name='name'>
密碼:<input type='password' name='pwd'>
<input type='submit' value='submit'>
</form>
login.php文件
header("Content-type:text/html;charset=utf-8");
if($_POST){
$dsn = 'mysql:dbname=1104javab;host=127.0.0.1';
$user = 'root';
$password = '';
try{
$pdo = new pdo($dsn,$user,$password,array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'UTF8\'')
);
}catch(Exception $e){
echo '錯誤'.$e->getmessage();
}
$name = $_POST['name'];
$pwd = $_POST['pwd'];
$sql = "select user_id from 表名 where username='$name' and password='$pwd'";
$stmt = $pdo->query($sql);
$info = $stmt->fetch(PDO::FETCH_ASSOC);
if($info){
echo "登錄成功";
}else{
echo "登錄失敗";
}
}
大概這樣
㈧ 求javascript+CSS+Html做的用戶注冊及登錄的兩個網頁頁面的代碼
要驗證碼就要結合後端,純前端做出來的登錄注冊都是靜態頁面
㈨ 微信h5源碼能授權登錄app嗎
移動端H5頁面能做微信授權登陸。
微信授權登錄的優勢:1、用戶量足夠大,基本所有用戶都會有微信,登錄起來比較方便快捷;2、微信作為一個開放平台,為眾多公眾號/服務開放了許多服務介面,讓公眾號能夠為自己的用戶提供更加個性、更加優質的產品服務。
打開一些H5頁面,你應該能經常微信授權登陸。
㈩ 網頁中加入用戶名、密碼、登陸及新用戶注冊源代碼
如果在網路中使用登陸機制一般都需要資料庫支持具體的代碼,特別是資料庫操作部分和自身的資料庫各表及欄位名稱有關,同時實現的方式還有很多特殊情況的處理,在這里很難提供,並且從安全的角度講,登陸與注冊也不易放置在同一頁面,同時還要有數據審核處理頁面,甚至可以說這需要一個系統。,建議你到免費的源代碼基地去找。