Giter VIP home page Giter VIP logo

Comments (1)

zuiwuchang avatar zuiwuchang commented on July 17, 2024

在用戶輸入時一般都是使用 ajax 調用驗證並將 clear 設置爲 false。只有在用戶真的提交動作時才以 clear true 驗證。

例如在登入時要輸入驗證碼。一般在點擊登入按鈕前,你在驗證碼輸入框裏面輸入時,前端就會使用 ajax 驗證你輸入的驗證碼是否正確並顯示一個勾或叉。此時 ajax 請求的驗證 clear 設置爲 false 所以可以重複請求驗證。只有當用戶點擊登入時,一般會將登入信息和驗證碼一起發送給後端,後端此時使用 clear 爲 true 來驗證驗證碼。所以登入失敗後無論驗證碼是否輸入正確通常都會刷新一個新的驗證碼給你輸入

from base64captcha.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.