Use Javascript to open a link in a new window
This is a common question I see a lot on the Web Development Forum I help moderate. Many new developers read the tutorial on XHTML and ask “if target is depreciated then how do I open a link in a new window?” The answer is you use JavaScript. It is true that if the user has JavaScript disable then the link won’t open at all, right? I’ll show you the best way to open a link and have it degrade gracefully if JavaScript isn’t enabled and will even defy popup blockers.
Our leading lady, the anchor
Here is the link we’ll use for this article and will add our JavaScript to this link later on.
<a href="http://www.w3schools.com">Web Development Tutorials</
RSS ?