Use the writeln() method of the document object to display the user agent in a

tag in the webpage. Hint: The userAgent property of the window.navigator object contains the user agent.

Respuesta :

Answer:

Note that writeln() add a new line after each statement

var txt = "<p>User-agent header: " + navigator.userAgent + "</p>";

$("#agent").writeln(txt);

Then Anywhere in the body tag of the html file

create a div tag and include an id="agent"