ClioSport.net

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

  • When you purchase through links on our site, we may earn an affiliate commission. Read more here.

HTML code help

Car  None
im a noob at making websites and I need some html code that will open a link in a new window on a webpage. Can anyone help???
 
<a href="link.html" target="_blank">My Link</a>

Replace My Link with the text you want the link to say
Replace link.html with the link to the new page you want to open in the new window.
 
Can't do it in html. Will have to be javascript.

Code:
<script language="javascript">
function newwin(url){
  open.window(url,'newwin','toolbars=no,status=no');
}

function closewin(url){
  window.close(url);
}
</script>
That's to go in the head of the page.

In the body:
Code:
<a href="page.html" onClick="javascript:newwin(this.href); return false">Open Window</a><br>
<a href="page.html" onClick="javascript:closewin(this.href); return false">Close Window</a>
 
Back
Top