html - node.js中base标签中href的问题
ringa_lee
ringa_lee 2017-04-17 15:46:11
0
1
795

我在node.js中的express中使用static中间件为static(__dirname+'/public'),html中的代码为

我想问一下base标签中的href属性为'/'是什么意思?不是一般都为http...这种属性值么?

ringa_lee
ringa_lee

ringa_lee

reply all(1)
巴扎黑

app.use(express.static(__dirname+'/public'));
This line of code is to set the base_url of your static resource
So in the page <base href="/"> / represents what you set Static resource path

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template