-1

I have button link in my web app. I run it from localhost. Source code like this, And I think it normally (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 I want, when I Click That Button, Browser will open new tab, and connect to facebook page. But what I get, it link to url:

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

enter image description here

Not facebook.com.

Any idea what happens?

Mukhlis Saputro
  • 189
  • 3
  • 17

1 Answers1

1

You need full href with protocol for external links, otherwise browser expect a file named 'facebook.com' on your site.

<a href="http://Facebook.com">...
Vasfed
  • 18,013
  • 10
  • 47
  • 53