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

What is wrong with this HTML file <title>Email</title> </head> <body> <style> bo

ID: 3827612 • Letter: W

Question

What is wrong with this HTML file

<title>Email</title>

</head>

<body>

    <style> body {background-color: #FF0000}</style>

        <center><img src="logo.png"></center>

" <form name="login form">

     email id <input type="email" name="email"><br><br>

     password <input type="password" name="pass"><br><br>

     <input type="submit" value="login">

</form>

</body>

</html>

   

<script type="text/javascript">

            function validation()

            {

                 var x = document.form["login form"]["email"].value;

                 var y = document.form["login form"]["pass"].value;

                 if(x===null|| x===""|| y===null|| y==="")

                 {alert("email id or password is blank")};

                     var x1= document.form["login form"]["java"].value;

                     var y1=document.form["1234"].value;

                  if(x1==="java"&& y1==="1234")

                  {alert("successful login");

                 }

             else

             {confirm("wrong username and/or password");}}

       </script>"

     

  

Explanation / Answer

<title>Email</title>
</head>
<body>
<style> body {background-color: #FF0000}</style>
<!-- <center><img src="logo.png"></center> -->
<form name="login_form">
email id <input id="emaila" type="email" name="email" ><br><br>
password <input id="epassword" type="password" name="pass"><br><br>
<input type="submit" value="login">
</form>
</body>
</html>


<script type="text/javascript">
function validation()
{
  
var x = document.forms["login_form"]["email"].value;   
var y = document.forms["login_form"]["pass"].value;
  

// var x= document.getElementById("emaila").value;
// var y = document.getElementById("epassword").value;
// alert(y);
  
if(x===null|| x===""|| y===null|| y==="")
{
    alert("email id or password is blank");
}

var x1= document.forms["login_form"]["email"].value;   
var y1=document.forms["login_form"]["pass"].value;
if(x==="java@ab.com"&& y==="1234")
{ alert("successful login");
}
else
{
    confirm("wrong username and/or password");
}
}
</script>

enter the username :java@ab.com

and password :1234

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