zoukankan      html  css  js  c++  java
  • 使用node.js中遇到的一些小bug

    1、BUG Cannot set headers after they are sent to the client

    解决:即发出一次请求得到两次或以上的回应时会出现此警告,此时注意查看再在一些条件下是否有使用return终止请求

    2、地址栏怪异问题....id=%209

    在html中查看时链接是这样的

    但当点击跳转时,网址栏却是这样的

    该问题是由于在"id= 20" 中存在了空格,将空格去掉之后就可以解决问题

    3、使用express时候req.query()提示

    query is not   a  functoin
    

    是一个属性

    bug将data设置为 这种格式的时候会使得输出的data为序列化呃呃不是对象

    data:{data:data},
    

    4、若没有使用语法时,则不需要使用占位符$

    <script type="text/html" id="td">
      <p><strong>Id:</strong>{{data.id}}</p>
      <p><strong>姓名:</strong>{{data.name}}</p>
      <p><strong>性别:</strong>{{data.gender}}</p>
      <p><strong>地址:</strong>{{data.gender}}</p>
      <p><strong>添加时间:</strong>{{data.cTime}}</p>
    </script>
    
    
  • 相关阅读:
    导出htmlcleaner
    备份
    本地win7搭建SVN
    nutch 导入ecl
    linux 启动nutch
    c++中的构造函数前加上explicit
    string::erase的使用心得
    C++的static关键字(转载)
    Boot Trigger
    strtol()详解
  • 原文地址:https://www.cnblogs.com/axu1997/p/12110476.html
Copyright © 2011-2022 走看看