我是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源支票影像:
我的問題在哪裏?