我是nodejs中的新成员。我试图通过显示HTML的NodeJS形式,这里是我的代码:javascript - 在node.js上显示html
function start(response){
\t console.log("Request handler 'start' was called.");
\t var body = '<html>\n'+
\t '<head>\n'+
\t '<meta http-equiv="Content-Type" content = "text/html:'+
\t 'charset = UTF-8" />'+
\t '</head>'+
\t '<body>'+
\t '<form action="/upload" method="post">'+
\t '<textarea name="text" rows="20" cols="60"></textarea>'+
\t '<input type="submit" value="submit text" />'+
\t '</form>'+
\t '</body>'+
\t '</html>';
\t response.writeHead(200,{"Content-Type":"text/plain"});
\t response.write(body);
\t response.end();
}
的问题是,当我运行的代码服务器只是给我的HTML源支票影像:
我的问题在哪里?