用戶注冊界面
① java里,我做了個用戶注冊界面,輸入用戶名,密碼點擊確定進行注冊。但是在注冊時要怎麼判斷用戶名是
使用sql語句: select count(*) from user where userName = 'registerName';如果返回的大於1,則存在該用戶了
② js怎麼實現多用戶注冊登錄界面
我是這么認為的!js和html只能做客戶端的事情,如界面元素布局,表單驗證這類的事情。如果只是要這樣一個表單,那就太簡單了。致於登錄驗證這樣的事,需要後台支持的,數據可能來自資料庫,只用js和html是完成不了的。
/**
* 顯示一個彈出界面
*
* @param url
* 界面地址,可以使jsp,頁也可以是action
* @param params
* 需要傳遞的參數
* @param titleDesc
* 頁面頭描述
* @param width
* 頁面寬度
* @param height
* 頁面高度
* @param parentView
* 頁面所在的父頁面
* @param callback
③ 怎樣用vs建立用戶注冊界面
請問用VS軟體建立注冊用戶的界面,首先你要學會為s怎麼操作?學會他操作了之後,然後你再去做這個界面就比較簡單的了,這樣你可以買本書學習
④ 編寫HTML有如下一個用戶注冊界面,現要求如下: (1)在注冊界面中增加一項「出生
出生???
⑤ java編寫一個用戶注冊及登錄界面
mportjava.awt.HeadlessException;
importjava.awt.event.ActionEvent;
importjava.awt.event.ActionListener;
importjavax.swing.ImageIcon;
importjavax.swing.JButton;
importjavax.swing.JFrame;
importjavax.swing.JLabel;
importjavax.swing.JOptionPane;
importjavax.swing.JPanel;
importjavax.swing.JPasswordField;
importjavax.swing.JTextField;
@SuppressWarnings("serial")
{
JLabellbl1=newJLabel("用戶名:");
JLabellbl2=newJLabel("密碼:");
JTextFieldtxt=newJTextField("admin",20);
JPasswordFieldpwd=newJPasswordField(20);
JButtonbtn=newJButton("登錄");
JPanelpnl=newJPanel();
privateinterror=0;
publicMainFrame(Stringtitle)throwsHeadlessException{
super(title);
init();
}
privatevoidinit(){
this.setResizable(false);
pwd.setEchoChar('*');
pnl.add(lbl1);
pnl.add(txt);
pnl.add(lbl2);
pnl.add(pwd);
pnl.add(btn);
this.getContentPane().add(pnl);
btn.addActionListener(newActionListener(){
@Override
publicvoidactionPerformed(ActionEvente){
if("admin".equals(newString(pwd.getPassword()))){
pnl.removeAll();
JLabellbl3=newJLabel();
ImageIconicon=newImageIcon(this.getClass().getResource("pic.jpg"));
lbl3.setIcon(icon);
pnl.add(lbl3);
}
else{
if(error<3){
JOptionPane.showMessageDialog(null,"密碼輸入錯誤,請再試一次");
error++;
}
else{
JOptionPane.showMessageDialog(null,"對不起,您不是合法用戶");
txt.setEnabled(false);
pwd.setEnabled(false);
btn.setEnabled(false);
}
}
}
});
}
publicstaticvoidmain(String[]args){
MainFramefrm=newMainFrame("測試");
frm.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
frm.setBounds(100,100,300,120);
frm.setVisible(true);
}
}
⑥ 如何製作網頁,完成一個簡單的用戶注冊功能
有用戶名和密碼,,還有許多信息的用戶注冊界面。。。
請發郵件到[email protected]尋求幫助。。
有效期為2天哈。。
⑦ 如何進行從登錄界面中的用戶注冊頁面的跳轉到注冊界面asp.net
需自備mac
osx
,
xcode
,
node
以及
npm
。
做好准備之後,打開終端(或其他命令行利器),鍵入下面命令:
npm
install
-g
react-native-cli
和
react-native...
⑧ 用java web編寫一個用戶注冊界面(只要寫出以下要求就行)
一步步更新:頁面
<form action="regist.servlet" method="post"><table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="tableAdd borTop"> <tr> <th width="14%" height="30" nowrap>用戶名</th> <td class="pl5"> <INPUT id="sName" name="name" type="text" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>密碼</th> <td class="pl5"> <INPUT name="password" type="password" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>確認密碼</th> <td class="pl5"> <INPUT name="confrimPwd" type="password" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>性別</th> <td class="pl5"> 男<INPUT name="sex" type="radio" value="1" checked="checked" size="20"> 女<INPUT name="sex" type="radio" value="0" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>愛好</th> <td class="pl5"> <INPUT name="enjoy" type="checkbox" size="20" value="籃球">籃球 <INPUT name="enjoy" type="checkbox" size="20" value="足球">足球 </td> </tr> <tr> <th width="14%" height="30" nowrap>生日</th> <td class="pl5"> <INPUT name="brithday" type="text" size="20"> </td> </tr> <tr> <th width="14%" height="30" nowrap>備注</th> <td class="pl5"> <textarea rows="5" cols="200" name="remark"></textarea> </td> </tr> <tr> <th width="14%" height="30" nowrap> </th> <td class="pl5"> <input type="submit" value="提交"> <input type="reset" value="重置"> </td> </tr></table></form>
資料庫部分:
import java.sql.DriverManager;import java.sql.ResultSet;import java.sql.SQLException;import com.mysql.jdbc.Connection;import com.mysql.jdbc.Statement;public class DataBaseUtil { public static Connection getConnection() throws ClassNotFoundException, SQLException { Class.forName("com.mysql.jdbc.Driver"); Connection conn = (Connection) DriverManager.getConnection("jdbc:mysql://192.168.100.113/datebase", "username", "password"); return conn; } public static Statement getPS() throws ClassNotFoundException, SQLException { Statement statement = (Statement) getConnection().createStatement(); return statement; } public static void close(Connection conn,Statement st,ResultSet rs) throws SQLException{ if(rs != null) { rs.close(); } if(st != null) { st.close(); } if(conn != null) { conn.close(); } }}
⑨ JSP寫一個用戶注冊界面,如何解決用戶名重復問題
這個很簡單<%
session("name")=request.form("name")
%>
<%set rslist=con.execute("select * from user where name = '"&session("name")&"'")%>
<%if not rslist.eof then %>
.
.The Name had Used! Please Input again!!!!
<% response.end %>
<% end if%>
另一種差不多:
StrSql = "select userid from sf_user where username = '" & ChkSql(request("username")) & "'"
Set rs2 = Conn.Execute(StrSql)
if not (rs2.bof or rs2.eof) then
response.write("用戶存在了!")
response.end
end ifStrSql = "select userid from sf_user where username = '" & ChkSql(request("username")) & "'"
Set rs2 = Conn.Execute(StrSql)
if not (rs2.bof or rs2.eof) then
response.write("用戶存在了!")
response.end
end ifStrSql = "select userid from sf_user where username = '" & ChkSql(request("username")) & "'"
Set rs2 = Conn.Execute(StrSql)
if not (rs2.bof or rs2.eof) then
response.write("用戶存在了!")
response.end
end if
下邊的內容是用JS判斷的:
<a href="#" onclick="checkAccount(form1.UserAccount.value);return false;"><font color="#990000">檢查帳號</font></a>
然後把下面的funciton加到javascript中
function checkAccount(sValue){
if (sValue == "")
{
alert("請輸入帳號");
return false;
}
sUrl="chk_reg.asp?preuser="+sValue;
sFeature="scrollbars=no,width=250,height=200,left=200,top=100";
oWin=window.open(sUrl,"single",sFeature);
}
然後chk_reg.asp中把preuser傳過去的參數判斷是否重復了,並顯示相應的信息就行了
<HTML>
<HEAD>
<TITLE> New Document </TITLE>
<META Http-Equiv="Content-Type" Content="text/html; charset=gb2312">
<SCRIPT LANGUAGE="JavaScript">
<!--
function ock_check(){
var obj=document.all.frm1;
for(var i=0;i<obj.usersName.length;i++){
if(obj.usersName[i].value==obj.userName.value){
alert("此用戶已經存在!");
return false;
}else{
alert("可以使用此用戶名!");
return ;
}
}
}
//-->
</SCRIPT>
</HEAD>
<BODY>
<FORM METHOD=POST ACTION="" name="frm1">
<!-- 此處可以用循環的方式將所有用戶名輸出在此
'rs.open "select userName from [user]",conn,1,1
do while
...
Response.write <INPUT TYPE='hidden' name='usersName' value='"&rs(0)&"'>
rs.movenext
loop
我在此處就簡單寫了
-->
<INPUT TYPE='hidden' name='usersName' value='wang'>
<INPUT TYPE='hidden' name='usersName' value='liang'>
<INPUT TYPE='hidden' name='usersName' value='huang'>
<INPUT TYPE='hidden' name='usersName' value='zhang'>
<INPUT TYPE="text" NAME="userName">
<INPUT TYPE="text" NAME="userPwd"><BR>
<INPUT TYPE="button" value="檢查用戶名" onclick="ock_check()">
</FORM>
</BODY>
</HTML>
⑩ WEB程序設計(後台登陸頁面和用戶注冊頁面設計)
這個其實蠻簡單 也是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
以上是我自己想的方法 很不專業 但是功能都能實現 忘高手給個比較專業的方法。