Which of the following buttons provides the best way to close the new window?

An application developer has written the following code on an HTML page supporting JavaScript
to open a new window. Which of the following buttons provides the best way to close the new
window?
<INPUT TYPE=”button” VALUE=”Open Message Window”
onClick=”newWindow=window.open(”,’tmpWindow’, ‘resizable=no,width=200,height=200’)”>

An application developer has written the following code on an HTML page supporting JavaScript
to open a new window. Which of the following buttons provides the best way to close the new
window?
<INPUT TYPE=”button” VALUE=”Open Message Window”
onClick=”newWindow=window.open(”,’tmpWindow’, ‘resizable=no,width=200,height=200’)”>

A.
<INPUT TYPE=”button” VALUE=”Close Message Window” onClick=”Child.close()”>

B.
<INPUT TYPE=”button” VALUE=”Close Message Window” onClick=”this.close()”>

C.
<INPUT TYPE=”button” VALUE=”Close Message Window” onClick=”tmpWindow.close()”>

D.
<INPUT TYPE=”button” VALUE=”Close Message Window” onClick=”newWindow.close()”>



Leave a Reply 0

Your email address will not be published. Required fields are marked *