一般来说不管是使用a标签还是使用button进行跳转,如果直接在href里面填“localhost:端口号/路径”,在QQ浏览器中控制台会报“not available”的错误,谷歌浏览器会报“Failed to launch ‘localhost:38080’ because the scheme does not have a registered handler.”的错误。
正确的做法是让浏览器识别出需要跳转的链接为一个超链接,需要在“localhost:端口号/路径”前面加上“http://”,变成“http://localhost:端口号/路径”
<a href="localhost:38080" target="_blank">超链接--新窗口打开---相当于window.open</a>