www.brychan.info

  • home
  • photos
    • finland
    • Vancouver Island
  • Brychan's android app store
    • App Store instructions
    • Reviews
    • Calculator Cyfrifianell
    • IBla
  • disasters
    • Natural Disasters >
      • Boxing day tsunami 2004
    • Other disasters >
      • TWA 800 plane crash
      • Iran Air 655 plane crash
      • Titanic
      • Chernobyl nuclear disaster
  • Programming
    • html
    • Python
  • home
  • photos
    • finland
    • Vancouver Island
  • Brychan's android app store
    • App Store instructions
    • Reviews
    • Calculator Cyfrifianell
    • IBla
  • disasters
    • Natural Disasters >
      • Boxing day tsunami 2004
    • Other disasters >
      • TWA 800 plane crash
      • Iran Air 655 plane crash
      • Titanic
      • Chernobyl nuclear disaster
  • Programming
    • html
    • Python

Picture

Password-protected webpage project:

Test 2.0

Password: forty-two


Code:
<html>
<script type="text/javascript">

function LogIn(){

var textBox = document.getElementById('TEXTBOX_ID');
textBox = textBox.value
if (textBox === "forty-two"){
window.location.replace("http://www.brychan.info/secret.html")
}
else {
alert ("Incorrect Password")
}
}

</script>

<body>
<style>
p {
    margin-top: 0em;
    margin-bottom: 0em;
    font-size: 22px;
    color: #339933;
}
h2 {
margin-bottom: 0em;
font-size: 30px;
color: #e60000;
}
</style>
​
<h2>Test 2.0</h2>
<p>Password: forty-two</p>
<input type="text" id="TEXTBOX_ID" style=width:125px;height:25px;font-size:17px;/>
<button onClick="LogIn()" style=height:25px;font-size:15px;>Log In</button>
</body>
</html>
Powered by Create your own unique website with customizable templates.