TORONTO KIDS COMPUTER CLUB | Friday 19:00 JavaScript Homework 21.10.22.
20004
post-template-default,single,single-post,postid-20004,single-format-standard,ajax_fade,page_not_loaded,,qode-theme-ver-7.6.2,wpb-js-composer js-comp-ver-6.10.0,vc_responsive

Friday 19:00 JavaScript Homework 21.10.22.

27 Oct Friday 19:00 JavaScript Homework 21.10.22.

Question 1:

Using the following diagram for reference, draw a diagram of the object model containment hierarchy that the browser would create in its memory for the following HTML.

Write the script reference to the first paragraph element using W3C DOM syntax.

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<title>Search Form</title>
</head>
<body>
<p id="logoPar"><img src="images/logo.jpg" height="90" width="300"
alt="Logo"></p>
<div id="searchForm">
<form action="cgi-bin/search.pl" method="post">
<div>
<label for="searchText">Search for:</label>
<input type="text" id="searchText" name="searchText">
<input type="submit" value="Search">
</div>
</form>
</div>
</body>
</html>

Question 2:

Write the HTML and JavaScript for a button input element named Hi, whose visible label reads Howdy, and whose action upon being clicked displays an alert dialog box that says, Hello to you, too!

No Comments

Sorry, the comment form is closed at this time.