Back to Index

    JavaScript Examples

    Changing Background Colours
    Let The Banners Fly!
    Days Till The Millenium
    Mortgage Calculator
    Carbon Dating Calculator
    Online Quiz
    A Simple MouseOver (Rollover) Script
    Popup Windows

    Protected Password

    This version uses the same JavaScript but it is kept in a separate file on the server so is not visible from the source of the page! The file on the server is simply a text file in this example named pass.js

    The JavaScript in that hidden file is called up using the following script in this file

    <script language="JavaScript" src="pass.js">

    </script>


    This method of keeping the JavaScript hidden can be used for other examples too.

    username

    password


    Enter username and password to proceed
    username is name password is pass

    The JavaScript below is the entire contents of the text file, no need for any HTML tags

    Return to top of page