http.createServer( function (request, response) {}).listen(8080);
createServer 方法 可以创建一个客户端和服务器端响应请求。
function 回调函数处理的就是 接收过程。
request 就是 所有请求信息
response 所有响应信息
listen 方法 监听端口
//index.html页面
<link rel="stylesheet" href="./static/1.css">
<body>
<img src="./static/2.jpg" alt="">
<h1>我是首页</h1>
<img src="/static/1.jpg" alt="">
<a href="./aboutus?id=10">关于我们</a><br>
<form action="/aboutus" method="POST">
<button type="submit">提交</button>
</form>
</body>
<script src="./static/1.js"></script>
//aboutus.html页面
<body>
<h1>关于我们<%=query%></h1>
<img src="/static/1.jpg" alt="">
</body>
纯地址页面,不传参