html的base标签用法

html里的base标签,用来设置当前页面的默认起始路径和默认打开目标。 html

用法以下: url

<base href="url " target="location "/>。 htm

 

问题出如今url 上。这个url 必须以“/”结尾,不然会产生错误。 get

 

好比: io

有<base href="http://localhost/project/"/>, im

页面后面有路径:image/logo.gif。 标签

这个全路径就是:http://localhost/project/image/logo.gif。 gif

 

若是是路径/image/logo.gif. 错误

这个全路径就是:http://localhost/image/log.gif。 location

相关文章
相关标签/搜索