导航:首页 > 源码编译 > h5登录注册页面源码

h5登录注册页面源码

发布时间:2022-07-14 10:58:09

㈠ 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页面怎么做

㈥ 注册页面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页面,你应该能经常微信授权登陆。

㈩ 网页中加入用户名、密码、登陆及新用户注册源代码

如果在网络中使用登陆机制一般都需要数据库支持具体的代码,特别是数据库操作部分和自身的数据库各表及字段名称有关,同时实现的方式还有很多特殊情况的处理,在这里很难提供,并且从安全的角度讲,登陆与注册也不易放置在同一页面,同时还要有数据审核处理页面,甚至可以说这需要一个系统。,建议你到免费的源代码基地去找。

阅读全文

与h5登录注册页面源码相关的资料

热点内容
喷油螺杆制冷压缩机 浏览:578
python员工信息登记表 浏览:376
高中美术pdf 浏览:160
java实现排列 浏览:512
javavector的用法 浏览:981
osi实现加密的三层 浏览:231
大众宝来原厂中控如何安装app 浏览:913
linux内核根文件系统 浏览:242
3d的命令面板不见了 浏览:525
武汉理工大学服务器ip地址 浏览:148
亚马逊云服务器登录 浏览:524
安卓手机如何进行文件处理 浏览:70
mysql执行系统命令 浏览:929
php支持curlhttps 浏览:142
新预算法责任 浏览:443
服务器如何处理5万人同时在线 浏览:250
哈夫曼编码数据压缩 浏览:424
锁定服务器是什么意思 浏览:383
场景检测算法 浏览:616
解压手机软件触屏 浏览:348