Answer to Question #217945 in HTML/JavaScript Web Application for priyanka

Question #217945

ask the user to enter three of their favourite television shows. once they have entered there shows,display the results. Use an array to store the three favourite television shows.


1
Expert's answer
2021-07-18T01:24:05-0400
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Q217945</title>
</head>
<body>
  <label for="i1">TV Show 1:<input id="i1" type="text"></label><br><br>
  <label for="i2">TV Show 2:<input id="i2" type="text"></label><br><br>
  <label for="i3">TV Show 3:<input id="i3" type="text"></label><br><br>
  <input type="button" value="Submit" onclick="onClick()">
  <script>
      function onClick () {
          document.body.innerHTML =
              "<ul>" +
                "<li>" + document.querySelector("#i1").value + "</li>" +
                "<li>" + document.querySelector("#i2").value + "</li>" +
                "<li>" + document.querySelector("#i3").value + "</li>" +
              "</ul>"
      }
  </script>
</body>
</html>

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS