Html 使用Href打开本地文件URL
我的电脑上有一个.html文件(本地),我只想有一个按钮或超链接 所以我做了这样的事情: 超链接:Html 使用Href打开本地文件URL,html,localhost,Html,Localhost,我的电脑上有一个.html文件(本地),我只想有一个按钮或超链接 所以我做了这样的事情: 超链接: <a href="www.google.com" target="_blank">test</a> 按钮: <button href="www.google.com">test</button> 测试 但它不起作用,因为此开放Url类似于: file:///C:/Users/Cyril/Documents/visual%20studio%2
<a href="www.google.com" target="_blank">test</a>
按钮:
<button href="www.google.com">test</button>
测试
但它不起作用,因为此开放Url类似于:
file:///C:/Users/Cyril/Documents/visual%20studio%202013/Projects/MyProject/www.google.com
我怎样才能打开www.google.com
感谢您的帮助您在
src
属性中的url地址之前缺少http
。而不是www.google.com
你应该有http://www.google.com
正确的超链接:
<a href="http://www.google.com" target="_blank">test</a>
addhttp://
在www.google.com
前面,很高兴你发现我的答案很有用。如果你能接受我的答案,如果它能解决你的问题,那就太好了:)我会的,需要等7分钟!