1、FR內置的demo中就配置了一套用戶信息,包括用戶基本信息、用戶所在部門職務、用戶角色、用戶權限。

公司主營業務:網站建設、網站設計、移動網站開發等業務。幫助企業客戶真正實現互聯網宣傳,提高企業的競爭能力。創新互聯公司是一支青春激揚、勤奮敬業、活力青春激揚、勤奮敬業、活力澎湃、和諧高效的團隊。公司秉承以“開放、自由、嚴謹、自律”為核心的企業文化,感謝他們對我們的高要求,感謝他們從不同領域給我們帶來的挑戰,讓我們激情的團隊有機會用頭腦與智慧不斷的給客戶帶來驚喜。創新互聯公司推出甘南免費做網站回饋大家。
2、點擊用戶管理,點擊添加新用戶即可。
import?java.util.ArrayList;
import?java.util.Scanner;
/**
*?
*?@author?young
*
*/
class?People?{
private?String?name;
private?String?password;
private?double?height;
private?double?tz;
private?String?blood;
public?People(String?name,?String?password,?double?height,?double?tz,
String?blood)?{
super();
this.name?=?name;
this.password?=?password;
this.height?=?height;
this.tz?=?tz;
this.blood?=?blood;
}
public?static?ArrayListPeople?addPeople(){
ArrayListPeople?al?=?new?ArrayListPeople();
Scanner?sc?=?new?Scanner(System.in);
System.out.print("請輸入姓名:");
String?n?=?sc.next();
System.out.print("請輸入密碼:");
String?pa?=?sc.next();
System.out.print("請輸入身高:");
double?h?=?sc.nextDouble();
System.out.print("請輸入體重:");
double?t?=?sc.nextDouble();
System.out.print("請輸入血型:");
String?b?=?sc.next();
People?p?=?new?People(n,?pa,?h,?t,?b);
al.add(p);
System.out.println("添加用戶成功!");
return?al;
}
public?static?int?cd(){
int?i?;
System.out.println("*********************");
System.out.println("*******菜??????單********");
System.out.println("*****?1???添加*******");
System.out.println("*****?2???查找*******");
System.out.println("*****?0???退出*******");
System.out.println("*********************");
Scanner?sc?=?new?Scanner(System.in);
System.out.print("請輸入你的選擇:");
i?=?sc.nextInt();
return?i;
}
public?static?void?find(ArrayListPeople?al){
Scanner?sc?=?new?Scanner(System.in);
System.out.print("請輸入查找姓名:");
String?n?=?sc.next();
System.out.print("請輸入查找密碼:");
String?pa?=?sc.next();
for(People?p?:?al){
if(p.name.equals(n)??(p.password.equals(pa))){
System.out.println("姓名:"?+?p.name?+?"?身高:"?+?p.height?+?"?體重:"?+?p.tz?+?"?血型:"?+?p.blood);
}else?{?
System.out.println("對不起!查無此人.");
}
}
}
public?static?void?main(String[]?args)?{
int?i?;
ArrayListPeople?al?=?new?ArrayListPeople();
i?=?cd();
while(i?!=?0){
switch?(i)?{
case?1:
al?=?addPeople();
break;
case?2:
find(al);
break;
case?0:
System.out.println("退出系統!");
break;
default:
break;
}
i?=?cd();
}
}
}
1:在網頁中編寫一個按鈕,比如添加用戶
form action="xxx.jsp"/
input type="submit" value="添加用戶"/
/form
2:添加mysql的jdbc驅動jar包
3:編寫一個數據庫操作輔助類,使用的sql語句,差不多如下
insert into tb_user values(?,?,?)等,你寫的太簡單,詳細點的要求可以發郵件到lixihara@126.com,我會幫你完成哦
文章名稱:java添加新用戶代碼 java用戶注冊代碼
標題URL:http://www.yijiale78.com/article46/doddjhg.html
成都網站建設公司_創新互聯,為您提供服務器托管、網站設計公司、小程序開發、手機網站建設、面包屑導航、定制網站
聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:631063699@qq.com。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯