没有。
console本身是个Debug的功能,也是个JavaScript的REPL。
如果要输入用prompt("please type ...")
我是用nodejs学习js,不是在浏览器里。。。。。
@东宫有喜: 那就用:
process.stdin.on('data', function (text) {
console.log('received data:', util.inspect(text));
if (text === 'quit\n') {
done();
}
});
更详尽的:http://docs.nodejitsu.com/articles/command-line/how-to-prompt-for-command-line-input