node --express处理get和post

swiftwwj 2019-12-28

<!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>

相关推荐