Hi guys, yahoo if we click yahoo. It simply open yahoo homepage, I am looking such code that open not only yahoo, but also msn, & one other sites with them. Is it possible that we can open 3 different sites by clicking a hyperlink, a text hyperlink such as above yahoo. can any one can share with me that code. any effort will be appreciated Thanks
I don't think you can have one HTML link and have it open multiple links, you would have to use pop ups. <html> <head> <title>openURLs.htm</title> <script type="text/javascript"> function Googles() { var http = "http://www.Google.com/"; var win1 = window.open(http); var win2 = window.open(http); var win3 = window.open(http); } </script> </head> <body> <a href="javascript:Googles()">Googles</a> </body> </html> Code (markup):
or if you want to open many different url, you can modify the variables <html> <head> <title>openURLs.htm</title> <script type="text/javascript"> function Googles() { var http1 = "http://www.google.com/"; var http2 = "http://www.yahoo.com/"; var http3 = "http://www.msn.com/"; var win1 = window.open(http1); var win2 = window.open(http2); var win3 = window.open(http3); } </script> </head> <body> <a href="javascript:Googles()">Googles</a> </body> </html> Code (markup):