Javascript exercises = how to pop up a window to display a link

topic description:

"the Art of Javascript DOM programming"
Chapter 5 topic: separating javascript

the source of the topic and its own ideas:

packages the js code in the prepareLinks function and adds this function to the onload event of the window object. In this way, Javascript and HTML are separated to achieve smooth degradation.

related code:

HTML:

   

Dec.15,2021

popUp (this.getAttribute ("herf"));
) misspelled
popUp (this.getAttribute ("href"));

)

look at the picture below. This is a pop-up ad for the CSDN blog. Its essence is a div. The pop-up ads on most websites are essentially a div

.
<div> 
    <a target='_blank' href=".....">
        <img src="..."/>
    </a>
</div>


window.open ('https://codeshelper.com/q/1010000017147643',' popup', 'width=320,height=480,alwaysRaised=yes')

at the same time herf = > href

Menu