alert()

alert()是window对象的方法,并没有在javascript。所以在node.js中运行js文件时会出现alert没有定义。

此时应该使用console.log().

posted @ 2017-09-21 13:49  jugglee  阅读(342)  评论(0编辑  收藏  举报