Which of the following choices shows how she should rewrite the script to make it function correctly?

Ling wants to add a button to her Web page that will transport the user to another Web page. She
does not to use a hyperlink, so she includes the following JavaScript:
<FORM>
<INPUT TYPE = “button” VALUE = “Home Web”
onClick = “href(http://219.155.184.2);”>
</FORM>
The code does not function as Ling intended.
Which of the following choices shows how she should rewrite the script to make it function
correctly?

Ling wants to add a button to her Web page that will transport the user to another Web page. She
does not to use a hyperlink, so she includes the following JavaScript:
<FORM>
<INPUT TYPE = “button” VALUE = “Home Web”
onClick = “href(http://219.155.184.2);”>
</FORM>
The code does not function as Ling intended.
Which of the following choices shows how she should rewrite the script to make it function
correctly?

A.
<FORM>
<INPUT TYPE=”button” VALUE=”Home Web”
onClick=”location.href=”http://219.155.184.2′:”>
</FORM>

B.
<FORM>
<INPUT TYPE=”button” VALUE=”Home Web”
onClick=”href = ‘http://219.155.184.2’: “>
</FORM>

C.
<FORM>
<INPUT TYPE=”button” VALUE=”Home Web”
Click=”href=”http://219.155.184.2′:”>
</FORM>

D.
<FORM>
<INPUT TYPE=”button” VALUE=”Home Web”
onClick=”location.href=”http://219.155.184.2″;”>
</FORM>



Leave a Reply 0

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