File: example.html

Recommend this page to a friend!
  Classes of Axel Hahn  >  AH JavaScript Password Strength Check  >  example.html  >  Download  
File: example.html
Role: Example script
Content type: text/plain
Description: Example script
Class: AH JavaScript Password Strength Check
Calculate and display the strength of a password
Author: By
Last change: added minified version; min version is used in examples now
Date: 2 years ago
Size: 2,118 bytes


Class file image Download
<!DOCTYPE html>
        <title>Demo for password checker</title>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <script src="ahpwcheck.class.min.js"></script>
        <link rel="stylesheet" type="text/css" href="example.css" />
        <h1>Demo 1 for password checker (ahpwcheck.class.js)</h1>
            <a href="example.html" class="active">example 1</a>
            <a href="example2.html">example 2</a>
            <a href="example3.html">example 3</a>
            <a href="example4.html">example 4</a>
            <a href="example5.html">example 5</a>

        <!-- ************************************************************** -->

        <h2>Basic usage: watch a password field</h2>
            <p class="info">
                Type something. Below the form is an info field that shows
                the kind of typed characters.
                <input type="password" id="ePassword">

            <div id="outpwcheck"></div>
            <script id="source">
                var oPwCheck = new ahpwcheck();
                oPwCheck.watch('ePassword', 'outpwcheck');

        <!-- ************************************************************** -->

            A simple form contains a password field with id "ePassword".<br>
            Below the form is a div with id "outpwcheck"<br>
            The method "watch()" adds a listener. While you type something
            the output div will be updated.
            document.write("<pre>" + document.getElementById("source").innerHTML + "</pre>");

        DOCS: <a href="http://www.axel-hahn.de/docs/ahpwcheck/index.htm" target="_blank">http://www.axel-hahn.de/docs/ahpwcheck/index.htm</a>