開課吧 項(xiàng)目1摘要自動生成 從原理到實(shí)戰(zhàn)
if(path == '/style'){
? ?response.setHeader('Content-Type', 'text/css; charset=utf-8')
? ?response.write('body{background-color: #ddd;}h1{color: red;}')
? ?response.end()
?}else if(path == '/script'){
? ?response.setHeader('Content-Type', 'text/javascript; charset=utf-8')
? ?response.write('alert("這是JS執(zhí)行的")')
? ?response.end()
?}else if(path == '/index'){
標(biāo)簽: