문제

I have a simple tag which has a url as its href, when I click on it, it appends the URL to the current address.

The address is www.example.com/event/

<a href="www.yahoo.com" taget="_blank">Here</a>

When I click on it, it will change to following

 www.example.com/event/www.yahoo.com
도움이 되었습니까?

해결책

It is a relative URI. Add http:// to make it an absolute URI:

<a href="http://www.yahoo.com" target="_blank">Here</a>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top