node.js - 为什么模板的页面效果经过res.render()渲染后都没了,js也都失效?
怪我咯
怪我咯 2017-04-17 14:56:50
0
2
808

请问下,我在html模板里给body设置了display:none

在加载完成事件中给body写了jQuery的fadeIn进入效果

为什么预览模板文件效果是正常,用node+artTemplate+express 来render页面后,浏览器看到的效果确是一片空白?

(返回的页面源码是渲染过的完整源码)

怪我咯
怪我咯

走同样的路,发现不同的人生

répondre à tous(2)
洪涛

请检查js路径等是否正确,打开调试窗口看报错。

大家讲道理

看看你的代码中,是不是下面这段代码?

app.all('*', function (req, res, next) {
    res.header("Content-Type", "application/json");
    next();
});
Derniers téléchargements
Plus>
effets Web
Code source du site Web
Matériel du site Web
Modèle frontal
À propos de nous Clause de non-responsabilité Sitemap
Site Web PHP chinois:Formation PHP en ligne sur le bien-être public,Aidez les apprenants PHP à grandir rapidement!