I want to open somewebsite.com , but it goes to localhost/somewebsite.com , why its taking relative path.
Definition and UsageThe href attribute specifies the URL of the page the link goes to. If the href attribute is not present, the <a> tag will not be a hyperlink. Tip: You can use href="#top" or href="#" to link to the top of the current page!
HREF JavaScript is a method to easily call a JavaScript function when a user clicks on a link on a website. If you've ever clicked a link and received a pop-up box, such as an alert dialog, then you've potentially seen this function in action.
Your link is missing the protocol at the start of the URL: http://
for pages not using SSL, https://
for pages securing data transfer using SSL.
If you want a link that works in either scenario, you can use //
instead of the fully qualified protocol.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With