search

Home  >  Q&A  >  body text

node.js - 为什么模板的页面效果经过res.render()渲染后都没了,js也都失效?

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

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

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

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

怪我咯怪我咯2863 days ago861

reply all(2)I'll reply

  • PHP中文网

    PHP中文网2017-04-17 14:58:50

    Please check whether the js path, etc. are correct, and open the debugging window to see the error.

    reply
    0
  • 大家讲道理

    大家讲道理2017-04-17 14:58:50

    Look at your code, is it the following code?

    app.all('*', function (req, res, next) {
        res.header("Content-Type", "application/json");
        next();
    });

    reply
    0
  • Cancelreply