node --express处理get和post

<!DOCTYPE html>
<html lang="en">
<head>
    
    
    
    <meta charset="UTF-8">
    <title>Document</title>
</head>

</html><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>        
    </style>
</head>
<body>
<form action="http://localhost:3000/login" method="get">
    用户名:<input type="text" name="username"><br>
     密码 :<input type="text" name="password"><br>
     <input type="submit" value="提交"></input>
</form>
</body>
</html>

创建public文件夹放入html文件

<!DOCTYPE html>
<html lang="en">
<head>
    
    
    
    <meta charset="UTF-8">
    <title>Document</title>
</head>

</html><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>        
    </style>
</head>
<body>
<form action="http://localhost:3000/login" method="get">
    用户名:<input type="text" name="username"><br>
     密码 :<input type="text" name="password"><br>
     <input type="submit" value="提交"></input>
</form>
</body>
</html>

 

<!DOCTYPE html>
<html lang="en">
<head>
    
    
    
    <meta charset="UTF-8">
    <title>Document</title>
</head>

</html><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style>     
    </style>
</head>
<body>
<form action="http://localhost:3000/login" method="get">
    用户名:<input type="text" name="username"><br>
     密码 :<input type="text" name="password"><br>
     <input type="submit" value="提交"></input>
</form>
</body>
</html>
posted @ 2019-12-28 17:48  distant-遥远  阅读(234)  评论(0编辑  收藏  举报