Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

<!Doctype html> <html> <head> <title>page</title> <script type=\"text/javascript

ID: 3557595 • Letter: #

Question

<!Doctype html>
<html>
<head>
<title>page</title>

<script type="text/javascript">
function checkPass(){
var password=document.getElementById('password').value;
if(password=="yes")
{
alert('welcome');
window.open("http://www.google.com")
}
else
{
alert('wrong password');
}
}
</script>


<style type="text/css">
body{text-align:center}
</style>


</head>

<body>
<Form name="pwordcheck" action="">
Password:<input type="password" id="password" name="password" size="15">
<input type="button" value="submit"yes");">
</Form>

</body>

</html>

Explanation / Answer

// password validating using javaScript

<!Doctype html>
<html>
<head>
<title>page</title>

<script type="text/javascript">
function checkPass()

{
var password=document.getElementById("password").value;
if(password=="yes")
{
alert('welcome');
window.open("http://www.google.com")
}
else
{
alert('wrong password');
}
}
</script>


<style type="text/css">
body{text-align:center}
</style>


</head>

<body>
<form name="pwordcheck" action="">
Password:<input type="password" id="password" name="password" size="15">
<input type="button" value="Submit"/>
</form>

</body>

</html>

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote