link pages in html

Computer Science
Tutor: None Selected Time limit: 1 Day

how to link one or more than one pages in html

May 10th, 2014

<ahref="#"class="yourlink">Click Here</a>

JS:

$('a.yourlink').click(function(e){
    e.preventDefault();
    window.open('http://yoururl1.com');
    window.open('http://yoururl2.com');});

window.open also can take additional parameters. See them here: http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

You should also know that window.open is sometimes blocked by popup blockers and/or ad-filters.

Addition from Paul below: This approach also places a dependency on JavaScript being enabled. Not typically a good idea, but sometimes necessary.


May 10th, 2014

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
May 10th, 2014
...
May 10th, 2014
Dec 5th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer