国产 无码 综合区,色欲AV无码国产永久播放,无码天堂亚洲国产AV,国产日韩欧美女同一区二区

Android開發(fā)----實(shí)現(xiàn)登錄注冊(cè)頁面(創(chuàng)建本地?cái)?shù)據(jù)庫,對(duì)注冊(cè)的賬戶密碼進(jìn)行存儲(chǔ))

這篇具有很好參考價(jià)值的文章主要介紹了Android開發(fā)----實(shí)現(xiàn)登錄注冊(cè)頁面(創(chuàng)建本地?cái)?shù)據(jù)庫,對(duì)注冊(cè)的賬戶密碼進(jìn)行存儲(chǔ))。希望對(duì)大家有所幫助。如果存在錯(cuò)誤或未考慮完全的地方,請(qǐng)大家不吝賜教,您也可以點(diǎn)擊"舉報(bào)違法"按鈕提交疑問。

實(shí)現(xiàn)登錄注冊(cè)頁面(創(chuàng)建本地?cái)?shù)據(jù)庫,對(duì)注冊(cè)的賬戶密碼進(jìn)行存儲(chǔ))

寫在前面:
本文實(shí)現(xiàn)了登錄注冊(cè)頁面的開發(fā),創(chuàng)建了本地?cái)?shù)據(jù)庫,存儲(chǔ)注冊(cè)的賬戶密碼。注冊(cè)賬戶為手機(jī)號(hào),對(duì)賬戶為手機(jī)號(hào)進(jìn)行了正則化驗(yàn)證。登錄成功跳轉(zhuǎn)至主頁面。

20221028-實(shí)現(xiàn)登錄注冊(cè)功能

登錄注冊(cè)的業(yè)務(wù)流程圖

安卓注冊(cè)與登錄開發(fā),Android,數(shù)據(jù)庫,android

頁面展示

安卓注冊(cè)與登錄開發(fā),Android,數(shù)據(jù)庫,android安卓注冊(cè)與登錄開發(fā),Android,數(shù)據(jù)庫,android

源碼如下:

首先說一下,項(xiàng)目部署是在原有項(xiàng)目新建兩個(gè)activity(項(xiàng)目右鍵–new–activity–empty activity):LoginActivity(登錄頁面布局文件.xml文件和登錄.java文件)和RegisterActivity(注冊(cè)頁面布局文件.XML和注冊(cè).java文件)兩個(gè)活動(dòng),并新建DBOpenHelper.java(main文件夾右鍵–new–.java)類(這個(gè)類是封裝數(shù)據(jù)庫的類)。

1.登錄頁面部署activity_login.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:orientation="vertical"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".LoginActivity">

<!--    不能輸入多行,要做數(shù)字判斷-->
    <EditText
        android:id="@+id/et_username"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="請(qǐng)輸入手機(jī)號(hào)"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginTop="20dp"
        android:gravity="center_vertical"
        android:textSize="20sp"/>
<!--密碼也要判斷-->
    <EditText
        android:id="@+id/et_password"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="請(qǐng)輸入密碼"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginTop="20dp"
        android:textSize="20sp"
        />
<!--    跳轉(zhuǎn)到mainactivity-->
    <Button
        android:id="@+id/btn_login"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="登錄"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginTop="20dp"
        />
    <Button
        android:id="@+id/btn_register1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="還沒有賬號(hào)?點(diǎn)擊注冊(cè)"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginTop="20dp"
        />
<!--    測(cè)試框 顯示數(shù)據(jù)庫存儲(chǔ)的內(nèi)容-->
<!-- 登錄頁面的最下面,設(shè)置了個(gè)通過輸入的用戶名調(diào)用數(shù)據(jù)庫結(jié)果的測(cè)試的listview欄-->
    <ListView
        android:id="@+id/test_text"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
    />
</LinearLayout>

2.注冊(cè)頁面部署activity_register.xml

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context=".RegisterActivity">
    <EditText
        android:id="@+id/et_register_username"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="請(qǐng)輸入賬號(hào)"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginTop="20dp"/>
    <EditText
        android:id="@+id/et_register_password"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="請(qǐng)輸入密碼"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginTop="20dp"/>
    <EditText
        android:id="@+id/et_again_password"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:hint="請(qǐng)?jiān)俅屋斎朊艽a進(jìn)行確認(rèn)"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginTop="20dp"/>
    <Button
        android:id="@+id/btn_register"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:text="點(diǎn)擊注冊(cè)"
        android:layout_marginLeft="20dp"
        android:layout_marginRight="20dp"
        android:layout_marginTop="20dp"
        />
</LinearLayout>

3.新建數(shù)據(jù)庫java文件,DBOpenHelper.java

新建數(shù)據(jù)庫,用來存儲(chǔ)注冊(cè)的用戶名和密碼

package com.domain.mainView;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;
import android.database.sqlite.SQLiteOpenHelper;

public class DBOpenHelper extends SQLiteOpenHelper {

    //定義創(chuàng)建用戶數(shù)據(jù)表的SQL語句  主鍵user數(shù)據(jù)庫表 username和password字段
    final String CREATE_USER_SQL=
            "create table user(_id integer primary " + "key autoincrement , username, password)";
    public DBOpenHelper(Context context, String name, SQLiteDatabase.CursorFactory factory, int version){
        super(context,name,null,version);
    }
    @Override
    //數(shù)據(jù)庫第一次創(chuàng)建時(shí)被調(diào)用
    public void onCreate(SQLiteDatabase db){
        //創(chuàng)建用戶列表 execSQL執(zhí)行修改數(shù)據(jù)庫內(nèi)容的SQL語句
        db.execSQL(CREATE_USER_SQL);
    }

    @Override
    //版本號(hào)發(fā)生改變時(shí)使用
    public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
        //提示版本更新
        System.out.println("---版本更新----"+oldVersion+"--->"+newVersion);
    }
}

4.注冊(cè)頁面,RegisterActivity.java

package com.domain.mainView;

import androidx.appcompat.app.AppCompatActivity;
import android.content.ContentValues;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class RegisterActivity extends AppCompatActivity {
    public static final int RESULT_CODE_REGISTER=0;
    private Button btn_register;
    private EditText et_register_username,et_register_password,et_again_password;
    /*數(shù)據(jù)庫成員變量*/
    private DBOpenHelper dbOpenHelper;
    
    String et_name;
    String et_password;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_register);
        //注冊(cè)按鈕
        btn_register=(Button) findViewById(R.id.btn_register);
        //用戶名編輯框
        et_register_username= findViewById(R.id.et_register_username);
        //密碼編輯框
        et_register_password=findViewById(R.id.et_register_password);
        //再次輸入密碼編輯框
        et_again_password=findViewById(R.id.et_again_password);
        
        /*實(shí)例化數(shù)據(jù)庫變量dbOpenHelper*/
        dbOpenHelper=new DBOpenHelper(RegisterActivity.this,"user.db",null,1);

        btn_register.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
            //獲取三個(gè)編輯框的內(nèi)容
                String et_name=et_register_username.getText().toString();
                String et_password=et_register_password.getText().toString();
                String et_confirm=et_again_password.getText().toString();

                //判斷異常情況彈窗
                //編輯框?yàn)榭?/span>
                if(TextUtils.isEmpty(et_name)){
                    Toast.makeText(RegisterActivity.this,"用戶名不能為空!",Toast.LENGTH_SHORT).show();
                    //對(duì)用戶名進(jìn)行手機(jī)號(hào)正則化驗(yàn)證,調(diào)用下面寫的idTelPhoneNumber方法
                }else if(!isTelPhoneNumber(et_name)){
                    Toast.makeText(RegisterActivity.this,"請(qǐng)輸入正確的手機(jī)號(hào)碼!",Toast.LENGTH_SHORT).show();
                } else if(TextUtils.isEmpty(et_password)){
                    Toast.makeText(RegisterActivity.this,"密碼不能為空!",Toast.LENGTH_SHORT).show();
                    //兩次密碼框內(nèi)容不一致
                }else if(!TextUtils.equals(et_password,et_confirm)){
                    Toast.makeText(RegisterActivity.this,"密碼不一致!",Toast.LENGTH_SHORT).show();
                } else{ 
                //存儲(chǔ)注冊(cè)的用戶名和密碼 把賬號(hào)密碼存儲(chǔ)進(jìn)數(shù)據(jù)庫
                    insertData(dbOpenHelper.getReadableDatabase(),et_name,et_password);
                    Toast.makeText(RegisterActivity.this,"注冊(cè)成功!",Toast.LENGTH_SHORT).show();
                }
                //關(guān)閉注冊(cè)頁面 跳轉(zhuǎn)到登錄頁面
                RegisterActivity.this.finish();
            }
        });
    }
    /*正則化驗(yàn)證手機(jī)號(hào)碼方法*/
    public static boolean isTelPhoneNumber(String mobile) {
        if (mobile != null && mobile.length() == 11) {
            Pattern pattern = Pattern.compile("^1[3|4|5|6|7|8|9][0-9]\\d{8}$");
            Matcher matcher = pattern.matcher(mobile);
            return matcher.matches();
        }else{
            return false;
        }
    }
    //創(chuàng)建數(shù)據(jù)庫的insert方法 插入數(shù)據(jù)方法
    private void insertData(SQLiteDatabase readableDatabase, String username1, String password1){
        ContentValues values=new ContentValues();
        values.put("username",username1);
        values.put("password",password1);
        readableDatabase.insert("user",null,values);
    }
    //重寫onDestroy()方法 
    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (dbOpenHelper != null) {
            dbOpenHelper.close();
        }
    }
}

5.登錄頁面,LoginActivity.java

package com.domain.mainView;

import androidx.appcompat.app.AppCompatActivity;
import android.content.Intent;
import android.database.Cursor;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.ListView;
import android.widget.SimpleAdapter;
import android.widget.Toast;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class LoginActivity extends AppCompatActivity {

    //定義登錄Button 編輯框
    private Button btn_login;
    private EditText et_password,et_userName;
    /*定義數(shù)據(jù)庫所需成員變量 */
    private DBOpenHelper dbOpenHelper;
    //數(shù)據(jù)庫里存儲(chǔ)的password
    String dbpassword;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_login);
        ListView test_text=(ListView)findViewById(R.id.test_text);
        //初始化
        initView();
        //注冊(cè)完之后更新

        /*定義數(shù)據(jù)庫對(duì)象 */
        dbOpenHelper=new DBOpenHelper(LoginActivity.this,"user.db",null,1);

        /*點(diǎn)擊跳轉(zhuǎn)至注冊(cè)頁面 【還沒有賬號(hào)?點(diǎn)擊注冊(cè)】按鈕*/
        Button btn_register1=(Button)findViewById(R.id.btn_register1);
        btn_register1.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //點(diǎn)擊按鈕跳轉(zhuǎn)到注冊(cè)頁面
                Intent intent = new Intent(getApplicationContext(), RegisterActivity.class);
                //注冊(cè)返回代碼為0時(shí),跳轉(zhuǎn)
                startActivity(intent);
            }
        });
        
        //登錄按鈕單擊事件
        btn_login=(Button)findViewById(R.id.btn_login);
        btn_login.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                //獲取輸入的密碼框內(nèi)容
                String etpassword=et_password.getText().toString();
                /*獲取數(shù)據(jù)庫里的數(shù)據(jù)*/
                //登錄按鈕獲取要查詢的賬號(hào)
                String key=et_userName.getText().toString();
                Cursor cursor=dbOpenHelper.getReadableDatabase().query("user",null,"username = ?",new String[]{key},null,null,null);
                //創(chuàng)建ArrayList對(duì)象,用于保存用戶數(shù)據(jù)結(jié)果
                ArrayList<Map<String,String>> resultList =new ArrayList<Map<String,String>>();//不用測(cè)試的話,直接遍歷取值getstring(2)就行,創(chuàng)建數(shù)組可以省去。
                while(cursor.moveToNext()){
                    //將結(jié)果集中的數(shù)據(jù)存入HashMap
                    Map<String,String> map=new HashMap<>();
                    //取出查詢結(jié)果第二列和第三列的值
                    //用戶名
                    map.put("username",cursor.getString(1));
                    //密碼
                    map.put("password",cursor.getString(2));
                    resultList.add(map);
          
                    //獲取數(shù)據(jù)庫中符合用戶名的對(duì)應(yīng)的密碼
                    dbpassword=map.get("password");
                }
                //正則化判斷輸入的賬號(hào)是否符合手機(jī)號(hào)格式
                if(!isTelPhoneNumber(key)){
                    Toast.makeText(LoginActivity.this,"請(qǐng)輸入正確的手機(jī)號(hào)!",Toast.LENGTH_SHORT).show();
                }else if (resultList == null || resultList.size() == 0) { //如果數(shù)據(jù)庫中沒有查詢的用戶數(shù)據(jù)
                    //顯示提示信息,沒有相關(guān)記錄
                    Toast.makeText(LoginActivity.this,
                            "該用戶名未注冊(cè),請(qǐng)先注冊(cè)", Toast.LENGTH_LONG).show();
                } else {
                /*R.layout.userdata_main、R.id.result_name, R.id.result_grade
                這里的是我登錄頁面里面有個(gè)測(cè)試框用來顯示數(shù)據(jù)庫中符合輸入的用戶名的結(jié)果的 
                等會(huì)寫在下面把 只有一個(gè)userdata_main.xml */
                    SimpleAdapter simpleAdapter= new SimpleAdapter(LoginActivity.this, resultList,
                            R.layout.userdata_main, new String[]{"username", "password"}, new int[]{R.id.result_name, R.id.result_grade});
                    //將適配器和測(cè)試的listview關(guān)聯(lián),我這里的listview叫test_text        
                    test_text.setAdapter(simpleAdapter);

                    //查到了用戶 對(duì)比輸入的密碼與數(shù)據(jù)庫的密碼是否一致 如果相等跳轉(zhuǎn)到主頁面去
                    if(etpassword.equals(dbpassword)){
                        Toast.makeText(LoginActivity.this,"登陸成功!",Toast.LENGTH_SHORT).show();
                        //跳轉(zhuǎn)到Mainactivity
                        Intent intent=new Intent(LoginActivity.this,MainActivity.class);
                        startActivity(intent);
                        //關(guān)閉登錄頁面
                        LoginActivity.this.finish();
                    }else{
                        Toast.makeText(LoginActivity.this,"密碼錯(cuò)誤!",Toast.LENGTH_SHORT).show();
                    }
                };
            }
        });
    }
    /*正則化驗(yàn)證手機(jī)號(hào)碼*/
    public static boolean isTelPhoneNumber(String mobile) {
        if (mobile != null && mobile.length() == 11) {
            Pattern pattern = Pattern.compile("^1[3|4|5|6|7|8|9][0-9]\\d{8}$");
            Matcher matcher = pattern.matcher(mobile);
            return matcher.matches();
        }else{
            return false;
        }
    }
    //定義初始化
    private void initView(){
        btn_login=findViewById(R.id.btn_login);
        et_userName=findViewById(R.id.et_username);
        et_password=findViewById(R.id.et_password);
    }

//    //重寫onDestroy()方法
    @Override
    protected void onDestroy() {
        super.onDestroy();
        if (dbOpenHelper != null) {
            dbOpenHelper.close();
        }
    }
}

6.這里是我登錄頁面上最下面有個(gè)測(cè)試窗口布局調(diào)用的這個(gè)XML,
(這個(gè)窗口是用來顯示,輸入框輸入的用戶名與之匹配的數(shù)據(jù)庫的結(jié)果的)userdata_main.XML(res文件夾–右鍵–new–layoutxml)

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical">
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/result_name"/>
    <TextView
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:id="@+id/result_grade"/>
    <TextView
        android:id="@+id/textView1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />
    <TextView
        android:id="@+id/textView2"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        />
</LinearLayout>
tips:要設(shè)置下點(diǎn)進(jìn)APP就是Login登錄頁面哦在AndroidManifest.XML里面
 <activity
            android:name=".LoginActivity"
            android:exported="true">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
            />
/*注意!?。∵@里同時(shí)要把mainactivity的exported屬性改為false 并刪除<intent-filter>屬性*/
		   <activity
		    android:name=".MainActivity" 
            android:exported="false"/>

登錄注冊(cè)的所有內(nèi)容都在這里啦!碼字不易,來過的點(diǎn)個(gè)贊吧!
還有還有,Android新手一枚,實(shí)現(xiàn)的功能比較簡(jiǎn)單,也有很多問題還沒考慮到,
有什么意見歡迎多多指教,有什么問題也歡迎留在評(píng)論區(qū)溝通交流哦!
下一篇:點(diǎn)擊查看商城主頁面底部導(dǎo)航欄的創(chuàng)建:使用Bottom Navigation Activity+Fragment+ViewPager實(shí)現(xiàn)底部導(dǎo)航欄
相關(guān)文章:
Android開發(fā)----實(shí)現(xiàn)應(yīng)用啟動(dòng)頁
Android開發(fā)----ViewPager實(shí)現(xiàn)廣告輪播圖
Android商城開發(fā)----點(diǎn)擊左側(cè)分類實(shí)現(xiàn)右側(cè)更新為對(duì)應(yīng)的商品列表
RecyclerView設(shè)置點(diǎn)擊選中更改背景顏色 這里是更改選中效果
Android商城開發(fā)----點(diǎn)擊加入購物車,購物車商品的增刪減文章來源地址http://www.zghlxwxcb.cn/news/detail-779643.html

到了這里,關(guān)于Android開發(fā)----實(shí)現(xiàn)登錄注冊(cè)頁面(創(chuàng)建本地?cái)?shù)據(jù)庫,對(duì)注冊(cè)的賬戶密碼進(jìn)行存儲(chǔ))的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!

本文來自互聯(lián)網(wǎng)用戶投稿,該文觀點(diǎn)僅代表作者本人,不代表本站立場(chǎng)。本站僅提供信息存儲(chǔ)空間服務(wù),不擁有所有權(quán),不承擔(dān)相關(guān)法律責(zé)任。如若轉(zhuǎn)載,請(qǐng)注明出處: 如若內(nèi)容造成侵權(quán)/違法違規(guī)/事實(shí)不符,請(qǐng)點(diǎn)擊違法舉報(bào)進(jìn)行投訴反饋,一經(jīng)查實(shí),立即刪除!

領(lǐng)支付寶紅包贊助服務(wù)器費(fèi)用

相關(guān)文章

  • arkTS開發(fā)鴻蒙OS應(yīng)用(登錄頁面實(shí)現(xiàn),連接數(shù)據(jù)庫)

    arkTS開發(fā)鴻蒙OS應(yīng)用(登錄頁面實(shí)現(xiàn),連接數(shù)據(jù)庫)

    喜歡的朋友可在抖音、小紅書、微信公眾號(hào)、嗶哩嗶哩搜索“淼學(xué)派對(duì)”。知乎搜索“編程淼”。

    2024年03月24日
    瀏覽(24)
  • Android studio 編寫一個(gè)登錄頁面,并且具有注冊(cè)功能

    Android studio 編寫一個(gè)登錄頁面,并且具有注冊(cè)功能

    1、創(chuàng)建登錄界面,點(diǎn)擊注冊(cè)按鈕,彈出注冊(cè)窗口。 2、創(chuàng)建注冊(cè)窗口,輸入用戶名和密碼,在SQLite中存儲(chǔ)用戶名和密碼。 3、注冊(cè)成功,跳轉(zhuǎn)到登錄界面,進(jìn)行登錄。 4、注冊(cè)成功,把用戶名和密碼保存到SharedPreferences中,登錄時(shí)自動(dòng)填充用戶名和密碼。 ??????????登錄頁

    2023年04月08日
    瀏覽(21)
  • Android Studio心得-創(chuàng)建登錄注冊(cè)項(xiàng)目

    ? ? ? ? 首先先了解AndroidStudio是什么:Android Studio是一個(gè)由谷歌開發(fā)的Android應(yīng)用程序開發(fā)環(huán)境,用于開發(fā)Android應(yīng)用程序。它基于JetBrains IntelliJIDEA軟件,并包含了許多定制化功能,包括易于使用的分析工具、內(nèi)存分析工具和代碼編輯器等,支持Java、Kotlin等多種編程語言。An

    2024年02月05日
    瀏覽(18)
  • 前端注冊(cè)登錄頁面數(shù)據(jù)庫交互(h5+css+php+mysql+axios)

    前端注冊(cè)登錄頁面數(shù)據(jù)庫交互(h5+css+php+mysql+axios)

    一個(gè)登錄注冊(cè)界面,并使用前端數(shù)據(jù)庫實(shí)現(xiàn)登陸注冊(cè)功能? 首先是index.html 直接在index.html里面寫了用axios,實(shí)現(xiàn)注冊(cè)和登錄 效果圖 登錄注冊(cè)滑動(dòng)實(shí)現(xiàn) script.js style.css 然后是登錄和注冊(cè)的php login.php register.php

    2024年02月11日
    瀏覽(19)
  • HTML實(shí)現(xiàn)簡(jiǎn)單注冊(cè)登錄頁面

    HTML實(shí)現(xiàn)簡(jiǎn)單注冊(cè)登錄頁面

    以下兩個(gè)頁面均只用HTML實(shí)現(xiàn)(其中注冊(cè)若要添加號(hào)碼與后面的登錄密碼判斷,涉及到j(luò)avascript的內(nèi)容,本文只使用了html,后續(xù)會(huì)加上這些內(nèi)容) 簡(jiǎn)單注冊(cè):(讀者可以自行增加圖片以及其他屬性) 登錄: ? ?

    2024年02月11日
    瀏覽(22)
  • Android開發(fā) 登錄注冊(cè)設(shè)計(jì)

    Android開發(fā) 登錄注冊(cè)設(shè)計(jì)

    用Android Studio 簡(jiǎn)單的實(shí)現(xiàn)登錄注冊(cè) 目錄 一、登錄界面 activity_login.xml 布局代碼: login.java 代碼:? 二、注冊(cè)界面? activity_register.xml布局代碼: register.java?代碼: 三、修改密碼(忘記密碼 ?) activity_update_password.xml布局代碼: UpdatePassword.java 代碼: 四、SQLite 與 SharedPreferences?

    2024年02月08日
    瀏覽(17)
  • 【安卓app開發(fā)一】Android Studio + Bmob后端云實(shí)現(xiàn)注冊(cè)&登錄賬號(hào)、密碼找回、意見反饋及數(shù)據(jù)可視化

    【安卓app開發(fā)一】Android Studio + Bmob后端云實(shí)現(xiàn)注冊(cè)&登錄賬號(hào)、密碼找回、意見反饋及數(shù)據(jù)可視化

    目錄 前言 概覽 Bmob后端云介紹 Bmob后端云與Android Studio配置 一、Bmob后端云 ?二、Android Studio配置 工具類 一、User類 二、Suit類 三、Code類 實(shí)現(xiàn)類 ?一、登錄代碼 ?二、注冊(cè)代碼 ?三、找回密碼代碼 ?四、想法反饋代碼 ? ? ? ? 本項(xiàng)目尚在開發(fā)階段,主要針對(duì)的是安卓用戶,通

    2024年02月08日
    瀏覽(26)
  • 登錄和注冊(cè)頁面 - 驗(yàn)證碼功能的實(shí)現(xiàn)

    登錄和注冊(cè)頁面 - 驗(yàn)證碼功能的實(shí)現(xiàn)

    目錄 1. 生成驗(yàn)證碼 2. 將本地驗(yàn)證碼發(fā)布成 URL 3. 后端返回驗(yàn)證碼的 URL 給前端 4. 前端將用戶輸入的驗(yàn)證碼傳給后端 5. 后端驗(yàn)證驗(yàn)證碼 使用hutool 工具生成驗(yàn)證碼. 1.1 添加 hutool 驗(yàn)證碼依賴 1.2 創(chuàng)建驗(yàn)證碼的控制器? application.propertities 中添加驗(yàn)證碼保存路徑 ( 末尾一定要帶斜桿

    2024年02月15日
    瀏覽(21)
  • 使用Android Studio創(chuàng)建第一個(gè)小項(xiàng)目(登錄頁面)

    使用Android Studio創(chuàng)建第一個(gè)小項(xiàng)目(登錄頁面)

    僅供參考,學(xué)習(xí)使用 我這里了就直接創(chuàng)建一個(gè)模塊了 然后選擇Empty Activity 接下來直接點(diǎn)finish 我沒有藝術(shù)細(xì)胞,所以畫的比較差,大家不要介意 點(diǎn)擊下面我圖片的箭頭處 然后點(diǎn)擊split ####刪掉我圖片中的內(nèi)容 然后點(diǎn)回design 點(diǎn)擊旁邊的TextView,拖動(dòng)到方框中來 接著我們讓這個(gè)

    2024年02月07日
    瀏覽(29)
  • Node.js連接數(shù)據(jù)庫 實(shí)現(xiàn)注冊(cè)、登錄、判斷注冊(cè)

    Node.js連接數(shù)據(jù)庫 實(shí)現(xiàn)注冊(cè)、登錄、判斷注冊(cè)

    Node.js連接數(shù)據(jù)庫實(shí)現(xiàn)注冊(cè),登錄,在登錄時(shí)檢測(cè)賬號(hào)是否進(jìn)行注冊(cè)。 此創(chuàng)建文件夾可以不是使用Vue-cli進(jìn)行創(chuàng)建,只是簡(jiǎn)單創(chuàng)建文件夾便可。 使用npm進(jìn)行mysql插件的安裝,cmd黑窗口運(yùn)行下列指令 此指令運(yùn)行完成,文件夾根目錄出現(xiàn) node_modules 文件 黑窗口運(yùn)行 npm init 指令,出現(xiàn)

    2024年02月09日
    瀏覽(41)

覺得文章有用就打賞一下文章作者

支付寶掃一掃打賞

博客贊助

微信掃一掃打賞

請(qǐng)作者喝杯咖啡吧~博客贊助

支付寶掃一掃領(lǐng)取紅包,優(yōu)惠每天領(lǐng)

二維碼1

領(lǐng)取紅包

二維碼2

領(lǐng)紅包