• A-Fu Design
  • 前端設計
    • jQuery 套件
    • HTML 5
  • 關於A-Fu
  • 隱私權政策
  • 聯絡A-Fu
Google+ facebook twitter

A-Fu Design

A-Fu Design



 Strength.js 套件能用在註冊時就先檢查密碼的強度,現在很多網站都有會員機制,很多人怕密碼會忘記或是偷懶都會用一些很簡短簡單的密碼,這樣就讓其它惡意的使用者就有機可趁,這也讓網站的管理者很頭大。

此套件主要的標準分數為:
密碼必須包含8個字符以上
密碼必須包含1個小寫字母
密碼必須包含1個大寫字母
密碼必須包含1個數字
當然有特殊的字元也是加分的關鍵

使用方法:
第一步 載入 JavaScripts 和 CSS 的樣式檔案
<!-- 樣式檔案 -->
<link href='strength.css' rel='stylesheet' type='text/css'>
<!-- 使用 Google 的 API 取得 jQuery-->
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<!-- Strength.js 的主程式檔案-->
<script type="text/javascript" src="strength.js"></script>

第二步 在您要使用密碼檢查的欄位加上 ID
<input id="myPassword" type="password" name="" value="">

第三步 使用 jQuery 的載入完成後執行 Strength.js
$('#myPassword').strength({
     strengthClass: 'strength',
     // 輸入框的樣式名稱
     strengthMeterClass: 'strength_meter',
     // 輸入的文字樣式名稱
     strengthButtonClass: 'button_strength',
     // 切換按鈕的樣式名稱
     strengthButtonText: 'Show password',
     // 是否顯示密碼文字
     strengthButtonTextToggle: 'Hide Password'
     // 是否要有切換顯示隱藏
});


作者網站:http://git.aaronlumsden.com/strength.js/
檔案大小:13 KB (包含範例)
檔案下載:https://github.com/aarondo/Strength.js/archive/master.zip
備份下載:下載
Share
Tweet
Pin
Share
No 意見
Newer Posts
Older Posts

About me

還在努力掙扎中的工程師

Follow Us

  • Google+
  • facebook
  • twitter

Categories

Accordion Animation AutoComplete CSS Calendar Canvas Carousel Charts Color DatePicker Effects Facebook API Forms Gallery HTML5 Menu Mootools Prototype React images jQuery javascripts lightbox 前端技術 統計圖表 網頁設計

Recent Posts

  • Kalendae 一個不依賴任何框架的日期選擇器
  • Line Developer Day 2018 內部技術與實務分享
  • NCC資安初級認證?只有這 5 款通過
  • AJAX progress bar 非同步傳輸結合 XML 資料回傳
  • jQuery Gantt Chart 在網頁上繪製甘特圖的 jQuery 套件

Sponsor

Facebook

Blog Archive

  • 6月 2025 (36)
  • 4月 2025 (48)
  • 3月 2025 (60)
  • 2月 2025 (51)
  • 1月 2025 (56)
  • 12月 2024 (61)
  • 11月 2024 (60)
  • 10月 2024 (54)
  • 9月 2024 (55)
  • 8月 2024 (42)
  • 7月 2024 (40)
  • 6月 2024 (19)
  • 9月 2023 (3)
  • 4月 2023 (2)
  • 2月 2023 (1)
  • 12月 2021 (1)
  • 1月 2019 (11)
  • 12月 2018 (31)
  • 11月 2018 (31)
  • 10月 2018 (31)
  • 9月 2018 (30)
  • 8月 2018 (31)
  • 7月 2018 (3)
  • 2月 2018 (1)
  • 4月 2015 (1)
  • 9月 2014 (1)
  • 2月 2014 (1)
  • 7月 2013 (1)
  • 2月 2013 (2)
  • 1月 2013 (1)
  • 12月 2012 (12)
  • 11月 2012 (81)
  • 10月 2012 (64)

Created with by ThemeXpose | Distributed by Blogger Templates