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都寫的這么明白了!你還不知道怎麼弄啊?