html - Open New Tab Link Facebook From Localhost When Button Onclick -


i have button link in web app. run localhost. source code this, , think (no error):

<a href="facebook.com" style="text-decoration:none;" target="_blank"><input type="button" value="pembuatan akun facebook" class="tombol" style="width:200px !important;"></a> 

what want, when click button, browser open new tab, , connect facebook page. get, link url:

http://localhost/dewata/facebook.com (my web app in folder dewata).

enter image description here

not facebook.com.

any idea happens?

you need full href protocol external links, otherwise browser expect file named 'facebook.com' on site.

<a href="http://facebook.com">... 

Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -