This time, instead of running the script from a link we'll run it from the
onLoad attribute of the <BODY ...> tag.

<BODY onLoad="popup('autopopup.html', 'ad')">

The command in onLoad is run when the document is finished loading. Like in our previous example, the command runs popup(), but this time the first argument for popup() is a little different. In the previous example we put this, meaning the link itself, and the script got the URL from the link. In this case there is no link so we pass the actual URL to open. So in our example we put
'autopopup.html'.