1、如何为网页制作一个有用户登陆和注册的功能网页???
这应该不是仅仅高手知道的吧?
原理是这样的:
如果是明文保存密码的话就简单了,入门也都教这样的,我也说这样的例子。
注册就是设置(最基本)两个input,一个用户名,一个密码。然后一个submit按钮。提交到本页,加一个参数。
比如
thispage.asp?action=reg
这里的参数是action,值是reg。
在页的另一部分进行获取
p = request.querystring("aciton");
if(p=="reg")
{
//这里进行注册
以刚才传过来的表单里的username为关键字进行SQL查找,看库里有无这个用户。如果没有,则写入数据库:刚才的用户名和密码。
如果有这个用户,返回信息,告知用户该名已被使用。
}
登陆也类似
只不过是先以用户名作为关键字进行查找,然后找不到该用户名报错,如果找到,则将其密码从数据库中提出,和用户从表单提交的值进行比较,如果不一致,报错。如果一致,则通过,登陆成功。
如果是以密文进行保存的密码,则需要更多处理,你现在根本弄不明白,还是先弄清楚明文密码吧。
2、jsp网站注册设计
一、先设计数据库
实体类有
1》用户(用户编号、用户姓名、密码、联系方式等信息)
2》帖子(帖子编号、用户编号、发帖子日期、等信息)
注意:帖子要引用用户编号为外键,这样才知道是谁发的帖子。
二、模块设计
注册就是写入数据库。insert into students values(????);
注册名是否被注册过:可以用ajax来查询当前用户名是否存在数据库中,然后返回结果
修改用户信息:update语句
浏览:查询select语句
发表帖子:insert语句
退出登陆:使session过期,就可以了。
数据库取存放数据:
可以用Hibernate,或者写JDBC代码
将数据放到JSP页面上,用标签语言就好了。JSTL,或者其他框架的语言。‘
网站设计最好自己做,在做的过程你会发现自己还有好多东西没有学会,做完后,你会发现自己思路、编程等方面都提升了很多。抄是骗自己并不是骗老师。
等毕业后找工作,你就知道错了。
3、如何设计网站的用户注册登录这一部分的数据库。
说的不太明白,首先要制作用户登录是使用表单实现的,最基本的要有四个页面可以实现,第一个页面时登录页面,第二个是登录成功的页面,第三个是登录失败的页面,第四个页面是验证的页面,在登陆页面上使用form action=“验证的页面”在验证的页面上使用 session获取对象,具体方法<body> <% Session("name")=request.form("name") Session("password")=request.form("pass") If Session("name")="王明"and Session("password")="123" Then Response.Redirect"chonggong.asp" Else Response.Redirect"shi.asp" End If %> </body>这与数据库连接可以在Dreamweaver中添加实现。有什么不明白的给我回话。希望我说的对你有所帮助
4、网站 注册公司可以以哪几种模式啊?<比如网页设计....除了这个还有哪几种?要全一点》
可以新注册网络科技公司或是软件公司
如何注册网络科技公司?
网络科技公司经营范围可以以计算机、电子专业领域内的技术开发、技术服务,计算机网络工程,计算机软硬件的开发,信息科技专业领域内的技术开发、技术服务,通信系统自动化软硬件的开发,通信网络工程,通信系统设备的销售、安装、调试、维护等为主要经营范围,同时也可以经营一些相关的产品销售。
网络科技公司注册流程统称为公司名称查询与核准、开户验资、工商登记、组织机构代码证申请及税务登记等。
我们现在以注册网络科技公司为例,为广大的投资者阐述其注册所需费用、办理流程、企业设立条件及财政扶持优惠政策如下几点:
一、网络科技公司名称参考
XX信息技术有限公司
XX计算机技术有限公司
XX软件科技有限公司
XX网络科技有限公司
……
备注:XX为符合工商规定的任意名称(可参见《企业名称登记管理规定》)
二、设立网络科技公司所需注册资本金详解
1、一人有限公司最低注册资本10万元人民币,注册资本需一次性出资到位。
2、二人或以上投资注册的有限公司最低注册资本3万元人民币,如注册资本金超过3万元以上则注册资本可以分批到位,首批不低于20%(不低于3万元),其余的在2年内到位。
三、网络科技公司经营范围参考
1、网络科技公司主要经营范围:计算机、电子专业领域内的技术开发、技术服务,计算机网络工程,计算机软硬件的开发,信息科技专业领
域内的技术开发、技术服务,通信系统自动化软硬件的开发,通信网络工程,通信系统设备的销售、安装、调试、维护等。
2、可选经营范围:电子产品、床上用品、化妆品、玩具、工艺品、食品等产品的销售等等。
其实大类的服务内容基本都在允许范围内,但我们投资创业指导专家建议经营范围不宜过多,以免让您的客户感觉您的企业不够专业。
四、网络科技公司注册所需材料
1、股东、法人身份证原件及影印件及实际经营地址、联系方式、照片各两张;
2、拟设立公司的名称(最好5个以上或更多)、经营范围;
3、注册资本及投资人出资比例;
4、注册地之租赁协议和房产证复印件(注册在经济区可由经济区提供);
5、财务人员上岗证与身份证复印件,照片2张;
6、其它规定的注册材料;
五、网络科技公司注册时间参考
名称核准完成,入资并出具验资报告后20--25个工作日左右。
六、网络科技公司注册流程
1、工商名称预先核准;
2、签署工商登记注册材料;
3、开立验资专户办理验资手续,出具验资报告;
4、办理工商登记;
5、刻制公章及其他所需印章;
6、组织机构代码登记;
7、办理税务登记;
8、去税务部门进行税种核定及购买发票。
5、你会做网页设计登录与注册页面吗?
这个其实蛮简单 也是WEB中最基础的东西
1.就是在SQLSERVER中建立表 来保存用户名和密码之类的信息。
2.信息获取的话 无非就是两个textbox,把密码的那个textbox的“type”属性改为“password”
3.创建数据库链接字符串 然后 sqlconnection --接着编写SQL查询语句--最后--sqlcommand。
4.这里我的方法是 用sqlcommand的Executereader方法来获取一个 datatable "dt".
然后来判断 dt的dt.rows.count属性是否大于0 如果大于0 则证明用户名与密码正确的了。 (即这行记录存在于表中)
前提是 你的SQL语句 必须这么写
select * from "保存用户信息的表" where textbox1.text=username and textbox2.text=password
6、网页设计如何设计登录注册框
<div class="Content_01" id="01_Title">·管理登陆</div>
<div class="DivContent" id="Content01">
<form id="form1" name="form1" method="POST" action="/xxzx/index.asp" onsubmit="return check()">
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="5">
<tr>
<td width="25%" height="25" align="right">用户名:</td>
<td><input name="Username" type="text" id="Username" size="20" /></td>
</tr>
<tr>
<td height="25" align="right">密 码:</td>
<td><input name="psw" type="password" id="psw" size="21" /></td>
</tr>
<tr>
<td height="25" colspan="2" align="center"><input name="Submit" type="submit" class="smallInput" value="登 陆" />
<input name="Submit2" type="reset" class="smallInput" value="重 置" /></td>
</tr>
</table>
</form>
</div>
</div>
欢迎 登陆本站!<br>
7、网页设计里的注册源代码
是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>
8、如何注册个人网站?
第一:找免费使用的自助建站平台
在百度上搜索建站或者自助建站之类的关键词,就能找到很多的自助建站平台,这里教大家怎么区分平台是不是可以免费注册个人网站。一般来说,如果自助建站网站支持免费建网站的,通常在搜索结果中都会有出现免费的字样,其次,在这些免费的自助建站平台里面,大家都可以先注册自己的账号,这样登录后就能确定,个人网站的建立是不是需要收费了。
第二:个人网站的申请注册
在搜索结果中进入自助建站的网站后,在网站上方一般都会有比较明显的“免费注册”的选项,具体按照自己选择的自助建站网站查找相关的注册按钮。进入注册界面以后,填写所申请个人网站的账号(大部分自助建站会将账号作为赠送的网站域名),选择网站的用途,以及其它的相关信息,并确定注册。
第三:网站注册后的设计操作
完成好个人网站的账号注册后,此时已经具备了网站域名和网站空间(自助建站平台附送),在自助建站平台上选择好自己的个人网站模板,然后对自己的个人网站进行相应的设计和功能添加,操作非常的简单,通过鼠标的拖拉就可以实现网站的布局和功能模块的增加,任何设计和添加操作都完全不用自己写代码,操作过程非常的简单。
第四:内容上传保存网站设置
设计好个人网站以后,按照个人网站每一个对应的模块,进行内容资料的上传和替换,所有内容上传以后,找到“保存”选项,对个人网站上的操作进行保存,保存成功以后,一个免费个人网站的注册就完成了。
9、在网页设计中的用户注册中,出生年月日是怎么做的?急!急!!!!
用这个js:
<script language="JavaScript">
var gdCtrl = new Object();
var SynCtl = new Object();
var goSelectTag = new Array();
var overcolor="#FF6600";
var gcGray = "#999999";
var gcToggle = "#FFFF99";
var gcBG = "#FFFFF4";
var titleBG="#3399CC";
var previousObject = null;
var oPopup = window.createPopup();
var gdCurDate = new Date();
var giYear = gdCurDate.getFullYear();
var giMonth = gdCurDate.getMonth()+1;
var giDay = gdCurDate.getDate();
function shutup(){
oPopup.hide();
}
function fSetDate(iYear, iMonth, iDay){
VicPopCal.style.visibility = "hidden";
if ((iYear == 0) && (iMonth == 0) && (iDay == 0)){
gdCtrl.value = "";
}else{
iMonth = iMonth + 100 + "";
iMonth = iMonth.substring(1);
iDay = iDay + 100 + "";
iDay = iDay.substring(1);
if(gdCtrl.tagName == "INPUT"){
gdCtrl.value = iYear+"-"+iMonth+"-"+iDay;
if(SynCtl!=null)
SynCtl.value = iYear+"-"+iMonth+"-"+iDay;
}else{
gdCtrl.innerText = iYear+"-"+iMonth+"-"+iDay;
if(SynCtl!=null)
SynCtl.innerText = iYear+"-"+iMonth+"-"+iDay;
}
}
}
function fSetSelected(aCell){
var iOffset = 0;
var iYear = parseInt(tbSelYear.value);
var iMonth = parseInt(tbSelMonth.value);
aCell.bgColor = gcBG;
with (aCell.children["cellText"]){
var iDay = parseInt(innerText);
if (color==gcGray)
iOffset = (Victor<10)?-1:1;
iMonth += iOffset;
if (iMonth<1) {
iYear--;
iMonth = 12;
}else if (iMonth>12){
iYear++;
iMonth = 1;
}
}
fSetDate(iYear, iMonth, iDay);
shutup();
}
function Point(iX, iY){
this.x = iX;
this.y = iY;
}
function fBuildCal(iYear, iMonth) {
var aMonth=new Array();
for(i=1;i<7;i++)
aMonth[i]=new Array(i);
var dCalDate=new Date(iYear, iMonth-1, 1);
var iDayOfFirst=dCalDate.getDay();
var iDaysInMonth=new Date(iYear, iMonth, 0).getDate();
var iOffsetLast=new Date(iYear, iMonth-1, 0).getDate()-iDayOfFirst+1;
var iDate = 1;
var iNext = 1;
for (d = 0; d < 7; d++)
aMonth[1][d] = (d<iDayOfFirst)?-(iOffsetLast+d):iDate++;
for (w = 2; w < 7; w++)
for (d = 0; d < 7; d++)
aMonth[w][d] = (iDate<=iDaysInMonth)?iDate++:-(iNext++);
return aMonth;
}
function fDrawCal(iYear, iMonth, iCellHeight, sDateTextSize) {
var WeekDay = new Array("日","一","二","三","四","五","六");
var styleTD = " bgcolor='"+titleBG+"' valign='middle' align='center' height='"+iCellHeight+"' style='font:bold "+sDateTextSize+";"; //Coded by Liming Weng(Victor Won) email:[email protected]
var styleTDBG = " bgcolor='"+gcBG+"' valign='middle' align='center' height='"+iCellHeight+"' style='font:"+sDateTextSize+";";
with (document) {
write("<tr>");
for(i=0; i<7; i++){
write("<td "+styleTD+"color:#ffffff' >"+ WeekDay[i] + "</td>");
}
write("</tr>");
for (w = 1; w < 7; w++) {
write("<tr>");
for (d = 0; d < 7; d++) {
write("<td id=calCell "+styleTDBG+"cursor:hand;' onMouseOver='this.bgColor=parent.gcToggle' onMouseOut='this.bgColor=parent.gcBG' onclick='parent.fSetSelected(this)'>");
write("<font id=cellText Victor='Liming Weng'> </font>");
write("</td>")
}
write("</tr>");
}
}
}
function fUpdateCal(iYear, iMonth) {
tbSelMonth.options[iMonth-1].selected = true;
for (i = 0; i < tbSelYear.length; i++)
if (tbSelYear.options[i].value == iYear){
tbSelYear.options[i].selected = true;
}
myMonth = fBuildCal(iYear, iMonth);
var i = 0;
for (w = 0; w < 6; w++)
for (d = 0; d < 7; d++)
with (cellText[(7*w)+d]) {
Victor = i++;
if (myMonth[w+1][d]<0) {
color = gcGray;
innerText = -myMonth[w+1][d];
}else{
color = ((d==0)||(d==6))?"#FF3300":"#009900";
innerText = myMonth[w+1][d];
}
}
updatePopup(VicPopCal.innerHTML);
}
function fSetYearMon(iYear, iMon){
tbSelMonth.options[iMon-1].selected = true;
for (i = 0; i < tbSelYear.length; i++)
if (tbSelYear.options[i].value == iYear){
tbSelYear.options[i].selected = true;
}
fUpdateCal(iYear, iMon);
}
function fGetXY(aTag){
var oTmp = aTag;
var pt = new Point(0,0);
do {
pt.x += oTmp.offsetLeft;
pt.y += oTmp.offsetTop;
oTmp = oTmp.offsetParent;
} while(oTmp.tagName!="BODY");
return pt;
}
// Main: popCtrl is the widget beyond which you want this calendar to appear;
// dateCtrl is the widget into which you want to put the selected date.
// i.e.: <input type="text" name="dc" style="text-align:center" readonly><INPUT type="button" value="V" onclick="fPopCalendar(dc,dc);return false">
function fPopCalendar(popCtrl, dateCtrl,strDate){
previousObject = popCtrl;
gdCtrl = dateCtrl;
SynCtl = strDate;
fInitialDate(strDate);
fSetYearMon(giYear, giMonth);
var point = fGetXY(popCtrl);
with (VicPopCal.style) {
left = point.x;
top = point.y+popCtrl.offsetHeight;
//width = VicPopCal.offsetWidth;
width = 206; // Added by Danian Zhang/SUI
height = VicPopCal.offsetHeight;
// visibility = 'visible';
}
updatePopup(VicPopCal.innerHTML);
var popLeft=parseInt(VicPopCal.style.left);
var popTop=parseInt(VicPopCal.style.top);
var popWidth=parseInt(VicPopCal.style.width);
var popHeight=parseInt(VicPopCal.style.height);
oPopup.show(popLeft,popTop,popWidth,popHeight,document.body);
}
function fPopSimulateCalendar(popCtrlID, dateCtrlID,strDate){
var itemID;
var popCtrl,dateCtrl;
with (document.all.tags("INPUT")){
for (i=0;i<length;i++){
if(item(i).type=="text"){
itemID=item(i).id;
if(itemID.indexOf(popCtrlID)>-1){
popCtrl=item(i);
dateCtrl=item(i);
break;
}
}
}
}
previousObject = popCtrl;
gdCtrl = dateCtrl;
SynCtl = strDate;
fInitialDate(strDate);
fSetYearMon(giYear, giMonth);
var point = fGetXY(popCtrl);
with (VicPopCal.style) {
left = point.x;
top = point.y+popCtrl.offsetHeight;
//width = VicPopCal.offsetWidth;
width = 206; // Added by Danian Zhang/SUI
height = VicPopCal.offsetHeight;
// visibility = 'visible';
}
updatePopup(VicPopCal.innerHTML);
var popLeft=parseInt(VicPopCal.style.left);
var popTop=parseInt(VicPopCal.style.top);
var popWidth=parseInt(VicPopCal.style.width);
var popHeight=parseInt(VicPopCal.style.height);
oPopup.show(popLeft,popTop,popWidth,popHeight,document.body);
}
function updatePopup(innerString){
var oPopupBody = oPopup.document.body;
oPopupBody.innerHTML =innerString;
}
// Added by Danian Zhang/SUI
function fInitialDate(strDate){
if( strDate == null || strDate.length != 10 )
return false;
var sYear = strDate.substring(0,4);
var sMonth = strDate.substring(5,7);
var sDay = strDate.substring(8,10);
if( sMonth.charAt(0) == '0' ) { sMonth = sMonth.substring(1,2); }
if( sDay.charAt(0) == '0' ) { sDay = sDay.substring(1,2); }
var nYear = parseInt(sYear );
var nMonth = parseInt(sMonth);
var nDay = parseInt(sDay );
if ( isNaN(nYear ) ) return false;
if ( isNaN(nMonth) ) return false;
if ( isNaN(nDay ) ) return false;
var arrMon = new Array(12);
arrMon[ 0] = 31; arrMon[ 1] = nYear % 4 == 0 ? 29:28;
arrMon[ 2] = 31; arrMon[ 3] = 30;
arrMon[ 4] = 31; arrMon[ 5] = 30;
arrMon[ 6] = 31; arrMon[ 7] = 31;
arrMon[ 8] = 30; arrMon[ 9] = 31;
arrMon[10] = 30; arrMon[11] = 31;
if ( nYear < 1900 || nYear > 2100 ) return false;
if ( nMonth < 1 || nMonth > 12 ) return false;
if ( nDay < 1 || nDay > arrMon[nMonth - 1] ) return false;
giYear = nYear;
giMonth = nMonth;
giDay = nDay;
return true;
}
var gMonths = new Array("一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月");
with (document) {
write("<Div id='VicPopCal' onblur='parent.shutup()' style='OVERFLOW:hidden;POSITION:absolute;VISIBILITY:hidden;width:180;z-index:100;'>");
write("<table width='100%' border='1' cellpadding='0' cellspacing='0' style='background-color:#EFF7FF;border-width:1px ;border-color:#3399CC;'>");
write("<TR><TD>")
write("<table width='100%' border='0' cellpadding='0' cellspacing='0' >");
write("<TR>");
write("<td valign='middle' align='center' style='font-size:9pt;background-color:#EFF7FF' HEIGHT='28'>");
write("<SELECT name='tbSelYear' onChange='parent.fUpdateCal(tbSelYear.value, tbSelMonth.value)' style='width:80' Victor='Won'>");
for(i=1900;i<2050;i++)
write("<OPTION value='"+i+"'>"+i+" 年</OPTION>");
write("</SELECT>");
write(" <select name='tbSelMonth' onChange='parent.fUpdateCal(tbSelYear.value, tbSelMonth.value)' style='width:80' Victor='Won'>");
for (i=0; i<12; i++)
write("<option value='"+(i+1)+"'>"+gMonths[i]+"</option>");
write("</SELECT>");
write("</td>");
write("</TR><TR>");
write("<td align='center'>");
write("<table width='95%' border='1' cellspacing='0' cellpadding='0' bordercolordark='#639ace' bodercolorlight='#ffffff'>");
fDrawCal(giYear, giMonth, 20, '9pt');
write("</table>");
write("</td>");
write("</TR><TR><TD align='center'>");
write("<TABLE width='98%'><TR><TD nowrap align='center' HEIGHT='25'>");
write("<span style='cursor:hand;font-size:9pt' onclick='parent.fSetDate(0,0,0)' onMouseOver='this.style.color=parent.overcolor' onMouseOut='this.style.color=0'>清空</span>");
write("</td><td algin='center' HEIGHT='25'>");
write("<span style='cursor:hand;font-size:9pt' onclick='parent.fSetDate("+giYear+","+giMonth+","+giDay+")' onMouseOver='this.style.color=parent.overcolor' onMouseOut='this.style.color=0'> 今天: "+giYear+"-"+giMonth+"-"+giDay+"</span></td>");
write("<td nowrap HEIGHT='25'><span style='cursor:hand;font-size:9pt' onMouseOver='this.style.color=parent.overcolor' onMouseOut='this.style.color=0' onclick='parent.shutup()'>关闭</span></td></tr></table>");
write("</TD></TR>");
write("</TABLE></TD></TR></TABLE></Div>");
}
</script>
添加一个按钮:
<button onclick="fPopCalendar(invalidateDate,invalidateDate);return false" name="button" type="button">q</button>
invalidateDate为变量可任意命名
我这js都写的这么明白了!你还不知道怎么弄啊?