What will the following JavaScript code do when it runs?

What will the following JavaScript code do when it runs?
var content=””;
content += “<HTML><HEAD><BASE TARGET=’_blank’></HEAD>”;
content += “<BODY BGCOLOR=’#CC9966′ TEXT=’#330000′>”;
content += “Related Sites”.big().fontcolor(“blue”) + “<P>\n”;
content += “These sites are of interest to “;
content += “Afrikunda”.italics();
content += ” patrons.<P>\n”;

What will the following JavaScript code do when it runs?
var content=””;
content += “<HTML><HEAD><BASE TARGET=’_blank’></HEAD>”;
content += “<BODY BGCOLOR=’#CC9966′ TEXT=’#330000′>”;
content += “Related Sites”.big().fontcolor(“blue”) + “<P>\n”;
content += “These sites are of interest to “;
content += “Afrikunda”.italics();
content += ” patrons.<P>\n”;

A.
open a new window with new content

B.
create content on the fly

C.
nothing, it is invalid

D.
overwrite each line with the previous line



Leave a Reply 0

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