Lab13js
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
<!DOCTYPE html>
|
||||
<!--
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
||||
Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/html.html to edit this template
|
||||
-->
|
||||
<html>
|
||||
<head>
|
||||
<title>Password Entry</title>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<script>
|
||||
//document.body.innerHTML = "a"; // Clear document contents
|
||||
var password = "";
|
||||
var promptString = "Please enter a password. Your password must be at minimum 8 characters in length.";
|
||||
var timesLooped = 0;
|
||||
do {
|
||||
if (timesLooped === 1) {
|
||||
promptString += " Password is under minimum length.";
|
||||
}
|
||||
password = prompt(promptString);
|
||||
timesLooped++;
|
||||
} while (password.length < 8);
|
||||
document.write("Password meets criteria. Password accepted!");
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
</body>
|
||||
</html>
|
Reference in New Issue
Block a user