hunganhsaturday Posted June 5, 2012 Share Posted June 5, 2012 I have html like this: <a href="http://mydomain.com">Click me</a>.But I want to add more than one address in this tag. I don't know how to do it. Please help.Thanks. Link to comment Share on other sites More sharing options...
Krewe Posted June 5, 2012 Share Posted June 5, 2012 You can not do this (To the best of my knowledge, which I am about 95% sure) with just HTML. So we'll use Javascript!Just an easy onclick function will make this work easy. <a href="YOUR_URL" target="_blank" onclick="window.open("YOUR_2nd_URL"); window.open("YOUR_3rd_URL");">Link text</a> So your code would look something like this. <a href="http://www.facebook.com" target="_blank" onclick="window.open("http://www.w3schools.com/"); window.open("http://www.w3schools.invisionzone.com/");">Link text</a> Link to comment Share on other sites More sharing options...
Ingolme Posted June 5, 2012 Share Posted June 5, 2012 Why would you want a link to open more than one page at a time? That would result in a very confusing user experience. Link to comment Share on other sites More sharing options...
hunganhsaturday Posted June 5, 2012 Author Share Posted June 5, 2012 You can not do this (To the best of my knowledge, which I am about 95% sure) with just HTML. So we'll use Javascript!Just an easy onclick function will make this work easy. <a href="YOUR_URL" target="_blank" onclick="window.open("YOUR_2nd_URL"); window.open("YOUR_3rd_URL");">Link text</a> So your code would look something like this. <a href="http://www.facebook.com" target="_blank" onclick="window.open("http://www.w3schools.com/"); window.open("http://www.w3schools.invisionzone.com/");">Link text</a> Thank you very much. Link to comment Share on other sites More sharing options...
Krewe Posted June 5, 2012 Share Posted June 5, 2012 Why would you want a link to open more than one page at a time? That would result in a very confusing user experience.Truthfully Foxy, I don't know... I was just giving the solution Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now