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

注册页面源码

发布时间:2022-01-24 04:02:46

① JS注册页面代码

这不是源码不源码的事,这得看你用的是什么技术,asp?php?JSP?能给你的只有Ajax的代码,后台的得看你用的什么技术。var xmlHttp;
try {
xmlHttp = new XMLHttpRequest();
} catch (trymicrosoft) {
try {
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
} catch (othermicrosoft) {
try {
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
} catch (failed) {
xmlHttp = false;
}
}
}function getList(id) {
xmlHttp.open('POST', '<%=basePath%>displayWorkCharacterTree.do?id='+id,true);
xmlHttp.onreadystatechange = handleResponse;
xmlHttp.send(null);
}function handleResponse() { if(xmlHttp.readyState == 4){
if (xmlHttp.status == 200 || xmlHttp.status == 0){
alert("已经注册"); }
}
}

② asp做注册页面代码

strSql="Insert Into tbUser(strUser,strPwd,strName,strSex)Values('" & strUser &"','" & strPwd & "','" & strName & "','" & strSex & "')"
只有四个字段,怎么能加入5个值进去呢?

③ 求大神写一下jsp的简单的注册界面代码。

1.需要一个jsp页面:
//login.jsp核心代码:
<form action="${pageContext.request.contextPath}/servlet/UserServlet" method="post">
<input type="text" name="loginname" /><input type="password" name="password"/>
<input type="submit" value="登录"/>
</form>
2.需要一个servlet来验证登录信息
//UserServlet 核心代码
class UserServlet extends HttpServlet{
protected void doGet(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
process(request, response);
}
protected void doPost(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
process(request, response);
}
private void process(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException {
PrintWriter pw = response.getWriter();
request.setCharacterEncoding("UTF-8");
response.setContentType("text/html");
String loginname = request.getParameter("loginname");
String password = request.getParameter("password");
//创建一个service来处理业务逻辑(包括查询数据库操作)
UserService service = new UserService();
boolean bool = service.validateUser(loginname,password);
if(!bool){
pw.println("用户名或密码错误");
}else{
pw.println("登录成功");
}
}
3.需要一个service处理业务逻辑(包括查询数据库操作)
//UserService 核心代码
public class UserService{
/**
*查询数据库验证用户是否存在,返回boolean
*/
public boolean validateUser(String loginname,String password){
boolean bool = false;
Connection conn = null;
PreparedStatement ps = null;
//这里以mysql为例
try {
Class.forName("com.mysql.jdbc.Driver").newInstance();
conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/test", "root", "");
String sql = "select login_name,pass_word from t_user where login_name=? and pass_word=?";
ps = conn.prepareStatement(sql);
ps.setString(0, loginname);
ps.setString(1, password);
ResultSet rs = ps.executeQuery();
if(rs.next()){
bool = true;
}
} catch (Exception e) {
e.printStackTrace();
} finally{
try {
if(conn != null){
conn.close();
conn = null;
}
if(ps != null){
ps.close();
ps = null;
}
} catch (SQLException e) {
e.printStackTrace();
}
}
return bool;
}
}

④ 注册页面html中的登录按钮代码

<input type="button" name="submit" value="Log in" class="left" onclick="OnSubmits()" />

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

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

⑥ 网页设计里的注册源代码

是jsp吗,还是asp什么的
首先数据库连接没问题,且库中有测试用户名和密码,我这里有一个拿去参考吧~
输入页面加入<from>表单,将用户输入内容提交到validation.jsp进行验证。
<form name="myform" action="validation.jsp" method="post">
<table cellSpacing="0" cellPadding="0" width="100%" border="0" height="143" id="table212">
<tr>
<td width="13%" height="38" class="top_hui_text"><span class="login_txt">用户: </span></td>
<td height="38" colspan="2" class="top_hui_text"><input name="username" class="editbox4" value="" size="20"> </td>
</tr>
<tr>
<td width="13%" height="35" class="top_hui_text"><span class="login_txt"> 密码: </span></td>
<td height="35" colspan="2" class="top_hui_text"><input name="userpass" class="editbox4" type="password" size="20" >
<img src="images/luck.gif" width="19" height="18"> </td>
</tr>
<td height="35" > </td>
<td width="10%" height="35" ><input name="Submit" type="submit" class="button" id="Submit" value="登 陆" onclick="return valid()"> </td>
<td width="80%" class="top_hui_text"><input name="cs" type="reset" class="button" id="cs" value="取 消"></td>
</tr>
</table>
<br>
</form>
然后第二个页面validation.jsp接收数据,验证通过后进入其他页面,比如'login.jsp'
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>活动日志</title>
</head>
<%//接收客户端提交的数据
String username=request.getParameter("username");
String pass=request.getParameter("userpass");
try{
ResultSet rs=inBean.executeQuery("select * from employees where emp_name='"+username+"' and emp_pwd='"+pass+"'");//执行SQL语句并返回结果
if(rs.next())
{ out.print("<script>window.location='login.jsp' </script>");
}
else{
// out.print("登陆失败");
out.print("<script>alert('用户名或密码错误,请重新登录...'); window.location='index.jsp' </script>");
// response.sendRedirect("index.jsp.html");
}
//rs.close();
rs.close();
}
catch(SQLException e1){out.println("SQL异常!");}
%>
<%session.setAttribute("userinfo", username); %>
<body>
</form>
</body>
</html>

⑦ 高价急求一个安卓程序(简单的登陆界面和注册界面)源码和程序 教程也可以

1
MainActivity

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
Button dengluButton =(Button)findViewById(R.id.button1);
Button zhuceButton=(Button)findViewById(R.id.button2);
final EditText yonghumingEditText=(EditText) findViewById(R.id.editText1);
final EditText mimaEditText=(EditText) findViewById(R.id.editText2);
zhuceButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent intent=new Intent();
intent.setClass(MainActivity.this, ZhuceActivity.class);
startActivity(intent);
}
});

dengluButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
FileInputStream fis;
try {
fis = new
FileInputStream(Environment.getExternalStorageDirectory().getParent()+"/"+yonghumingEditText.getText().toString());
byte[] input =new byte[fis.available()];
while(fis.read(input)!=-1);
fis.close();
String mimastring=new String(input);
if (mimastring.equals(mimaEditText.getText().toString())==true) {
Toast.makeText(getApplicationContext(), new String(input),Toast.LENGTH_SHORT).show();
String mimaString= new String(input);
if (mimastring.equals(mimaEditText.getText().toString())==true) {
Toast.makeText(getApplicationContext(), "成功登陆", Toast.LENGTH_SHORT).show();
Intent intent =new Intent();
intent.setClass(MainActivity.this,ZhuceActivity.class );
startActivity(intent);

}
else {
Toast.makeText(getApplicationContext(), "用户名或密码错误", Toast.LENGTH_SHORT).show();

}
}
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Intent intent=new Intent(MainActivity.this,AbActivity.class);
startActivity(intent);

}

});
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.main, menu);
return true;
}

}

2. ZhuceActivity

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_zhuce);
Button zhucebingfanhuiButton = (Button) findViewById(R.id.button1);
final EditText yonghumingEditText=(EditText) findViewById(R.id.editText1);
final EditText mimaEditText=(EditText) findViewById(R.id.editText2);

zhucebingfanhuiButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
File writeFile=new File(Environment.getExternalStorageDirectory().getPath(),yonghumingEditText.getText().toString());
if (!writeFile.exists()) {
try {
writeFile.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}
String abcString =mimaEditText.getText().toString();
FileOutputStream fos;
try {
fos=new FileOutputStream(writeFile);
fos.write(abcString.getBytes());
fos.flush();
fos.close();
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Intent intent= new Intent();
intent.setClass(ZhuceActivity.this, MainActivity.class);
startActivity(intent);
}
});
}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.zhuce, menu);
return true;
}

}

三、
package com.example.zhuanhuan;

import java.io.File;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

import com.example.zhuanhuan.MainActivity;
import com.example.zhuanhuan.R;
import android.os.Bundle;
import android.os.Environment;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class KkkActivity extends Activity {

private File writeFile;

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.kkk);
Button backButton = (Button) findViewById(R.id.button1);
final EditText yonghumingEditText = (EditText) findViewById(R.id.editText1);
final EditText mimaEditText = (EditText) findViewById(R.id.editText2);

backButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub

File writeFile = new File(Environment.getExternalStorageDirectory().getPath(), yonghumingEditText.getText().toString());
if (!writeFile.exists()) {

try {
writeFile.createNewFile();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}

}

String abcString = mimaEditText.getText().toString();
FileOutputStream fos;

try {

fos = new FileOutputStream(writeFile);
fos.write(abcString.getBytes());
fos.flush();
fos.close();

} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
Intent intent = new Intent();
intent.setClass(KkkActivity.this, MainActivity.class);
startActivity(intent);

}
});

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.kkk, menu);
return true;
}

}
四、
package com.example.zhuanhuan;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class AaaActivity extends Activity {

@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.aaa);

Button jianceButton = (Button) findViewById(R.id.button1);
jianceButton.setOnClickListener(new OnClickListener() {

@Override
public void onClick(View arg0) {
// TODO Auto-generated method stub
Intent intent = new Intent();
intent.setClass(AaaActivity.this, QqqActivity.class);
startActivity(intent);
}
});

}

@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.aaa, menu);
return true;
}

}

⑧ java注册页面代码

很简单,
建一个叫student的对象,然后给他几个属性。
存在一个list里就行了,
登录的时候就便利这个list,发现有一样的,就给他进去,没有就报错。

你用可以存key和valu的容器也行。

⑨ 注册/登陆页面HTML代码该怎么写

以下为个人原创教学例子,任何人引用需注明出自网络知道用户am7972,楼主可供参考
该例子涵盖了文本框、密码框、下拉菜单、单选框、复选框及文本区的使用
同时在数据的使用方面涵盖了文本型、数值型、日期型、布尔型的使用
也涵盖了在会员信息入数据库前,进行严格的数据检查
不足处,JS验证还不是太完善,不过有服务端认证足够了
<title>会员注册</title>
<script type="text/javascript">
<!--function CheckForm()
{
if(document.userinfo.username.value == "")
{ alert("请输入姓名,姓名不能为空!");
document.userinfo.username.focus();
return false;
}
if(document.userinfo.username.value.length > 10)
{
alert("输入的姓名长度最多为10个字符!");
document.userinfo.username.focus();
return false;
}
}
//--></script>
</head>
<body>
<table border="1" width="53%" bordercolorlight="#000000" cellspacing="0" id="table1" height="358" bordercolor="#000000" bordercolordark="#FFFFFF" cellpadding="0">
<form method="POST" action="bb.asp" name="userinfo" onsubmit="return CheckForm();">
<tr><td colspan="2" height="37"> <p align="center">会员注员</td> </tr>
<tr> <td width="37%" align="right">姓名:</td> <td width="61%"> <input type="text" name="username" value="libin" size="13"> </td> </tr>
<tr> <td width="37%" align="right">密码:</td> <td width="61%"> <input type="password" name="userPassword" size="20" value="123"></td> </tr>
<tr> <td width="37%" align="right">性别:</td> <td width="61%"><input type="radio" value="True" checked name="Sex">男 <input type="radio" name="Sex" value="False">女</td> </tr>
<tr> <td width="37%" align="right">生日:</td> <td width="61%"> <input type="text" name="userSR" size="11" value="1985-03-12"></td> </tr>
<tr> <td width="37%" align="right">年龄:</td> <td width="61%"><input type="text" name="userNL" size="9" value="13"></td> </tr>
<tr> <td width="37%" align="right">爱好:</td> <td width="61%"> <input type="checkbox" name="ah" value="sw">上网 <input type="checkbox" name="ah" value="ds" checked>读书 <input type="checkbox" name="ah" value="ty">体育</td> </tr>
<tr> <td width="37%" align="right">上网方式:</td> <td width="61%">
<select size="1" name="swfs"> <option selected value="bhsw">拨号上网</option> <option value="wxsw">无线上网</option> <option value="gxsw">光纤上网</option> </select>
</td> </tr>
<tr> <td width="37%" align="right">个人简介:</td> <td width="61%"><textarea rows="9" name="userGrjs" cols="34"></textarea></td> </tr> <tr> <td colspan="2" height="38"> <p align="center"><input type="submit" value="提交" name="B1"> <input type="reset" value="重置" name="B2"></td>
</tr>
</form>
</table>
====bb.asp的会员注册非法数据监测====
<%
username = Request("username")
userPassword = Request("userPassword")
Sex = Request("Sex")
userSR = Request("userSR")
userNL = Request("userNL")
ah = Request("ah")
swfs = Request("swfs")
userGrjs = Request("userGrjs")
'判断数据合法性,绝对不能让非法数据进入系统
'判断姓名username合不合法,是否包含非法数据
username = Trim(username) '例如:" 张 三 "经过处理之后变成"张 三"
If username ="" Then
Response.write "姓名不能为空"
Response.End
End If
If Len(username)>10 Then
Response.write "姓名字数不能超过10个字" 'Len("Z")=1 Len("国")=2
Response.End
End If
For i = 1 To Len(username)
q = Mid(username,i,1)
If InStr("!@#$%^&*()_-+|<>?/"",.",q)>0 Then
Response.write "姓名不能包含特殊符号!@#$%^&*()_-+|<>?/"",."
Response.End
End If
Next
'判断密码合不合法,是否包含非法数据userPassword = Trim(userPassword)If userPassword ="" Then Response.write "密码不能为空" Response.EndEnd If
If Len(userPassword)>20 Then
Response.write "密码字数不能超过20个字"
Response.End
End If
'判断密码合不合法,是否包含非法数据
Sex = Trim(Sex)
If Sex = "" Then
Response.write "性别不能为空"
Response.End
End If
If Sex <> "True" And Sex <> "False" Then
Response.write "性别不能为不男不女"
Response.End
End If
'判断生日合不合法,是否包含非法数据
userSR = Trim(userSR)
If userSR ="" Then
Response.write "生日不能为空"
Response.End
End If
If Len(userSR)<8 Or Len(userSR)>10 Then '例如:2012-6-3 2012-11-23
Response.write "你输入的生日字数不对,应为2012-6-3或2012-11-23格式"
Response.End
End If
If IsDate(userSR)=False Then
Response.write "你输入的生日格式不能转化为日期,请核实"
Response.End
End If
If DateDiff("yyyy",userSR,Date())<1 Or DateDiff("yyyy",userSR,Date())>200 Then
Response.write "根据你输入的生日你可能小于1岁或已经超过200岁了,请核查重新输入"
Response.End
End If
'判断年龄合不合法,是否包含非法数据userNL = Trim(userNL)If userNL ="" Then
Response.write "年龄不能为空"
Response.End
End If
If IsNumeric(userNL)=False Then
Response.write "你输入的年龄不能转化为数值,请核查"
Response.End
End If
userNL = CInt(userNL)
If userNL<0 Or userNL>200 Then
Response.write "你输入的年龄不能小于0岁或者大于200岁,请核查"
Response.End
End If
'判断爱好合不合法,是否包含非法数据ah = Trim(ah) '选择多个爱好则系统会用,分开 //测试
ah = Replace(ah," ","")
arrAh = Split(ah,",")
For i = LBound(arrAh) To UBound(arrAh)
If arrAh(i)<>"sw" And arrAh(i)<>"ds" And arrAh(i)<>"ty" Then
Response.write i & "你选择的爱好有问题,请核查" & arrAh(i)
Response.End
End If
Next
'判断上网方式合不合法,是否包含非法数据swfs = Trim(swfs)If swfs = "" Then
Response.write "上网方式不能为空"
Response.End
End If
If swfs<>"bhsw" And swfs<>"wxsw" And swfs<>"gxsw" Then
Response.write "你选择的上网方式有问题,请核查"
Response.End
End If
'判断个人简介是否为空,是否超出1000个字
userGrjs = Trim(userGrjs)
If userGrjs = "" Then
Response.write "个人简介不能为空"
Response.End
End If
If Len(userGrjs) > 1000 Then
Response.write "个人简介不能超过1000个字"
Response.End
End If
Response.write "数据合法性检测通过"
%>
====登陆的HTML代码可相信楼主参照会员注册代码应该没问题了====

⑩ 表单注册页面代码

谁会为那几个没什么实际意义的网络分给你做这么累的事哦???

阅读全文

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

热点内容
服务器一直崩应该用什么指令 浏览:916
cm202贴片机编程 浏览:724
php构造函数带参数 浏览:175
解压电波歌曲大全 浏览:336
为啥文件夹移到桌面成word了 浏览:858
命令符的安全模式是哪个键 浏览:758
编程中学 浏览:956
单片机求助 浏览:993
ug加工侧面排铣毛坯怎么编程 浏览:271
程序员有关的介绍 浏览:736
支付宝使用的什么服务器 浏览:210
安卓看本地书用什么软件好 浏览:921
经传软件滚动净利润指标源码 浏览:522
萤石云视频已加密怎么解除 浏览:574
一命令四要求五建议 浏览:30
qq文件夹迁移不了 浏览:19
液体粘滞系数测定不确定度算法 浏览:332
轻栈源码 浏览:426
把图片压缩到500k 浏览:35
命令你自己 浏览:369