Here is some ways to make html links for a webpage, it will be useful for students who are beginners in web development.
Open a link in a new window using HTML5
<a href="http://vishmax.com" target="_blank">Clicking in this will open a new window</a> |
<a href="http://vishmax.com" target="_blank">Clicking in this will open a new window</a>
Above option is fully html, and below is an example which uses jQuery for opening link on new window.
Open a link in a new window using jQuery
HTML part
<a href="/about" class="about">About our company</a> |
<a href="/about" class="about">About our company</a>
jQuery part
$(document).ready(function(){
$('a.about').click(function(){
window.open(this.href);
return false;
});
}); |
$(document).ready(function(){
$('a.about').click(function(){
window.open(this.href);
return false;
});
});