国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

html5 - 新手問:為什麼form表單的post請(qǐng)求 路由處理不了
迷茫
迷茫 2017-06-10 09:49:12
0
1
907

前臺(tái) ws.html

<form method="post">  
    <p class="form-group" >
            <lable for="name">手機(jī)號(hào)</lable>
            <input type="text" class="form-control" id="name" placeholder="請(qǐng)輸入你的手機(jī)號(hào)" name="pnum">
            <lable for="price">QQ號(hào)</lable>
            <input type="text" class="form-control" id="price" placeholder="請(qǐng)輸入你的qq號(hào)" name="qnum">
            <lable for="num">郵箱</lable>
            <input type="text" class="form-control" id="num" placeholder="請(qǐng)輸入你的郵箱" name="email">          
    </p>
    <button type="submit" class="btn btn-default">提交</button>
</form>

路由 ws.js

router.post('/ws',function(req,res,next){
    console.log(req,body);
    res.render('suc',{
       message : "恭喜你完善成功",
    })
})

#
迷茫
迷茫

業(yè)精于勤,荒于嬉;行成于思,毀于隨。

全部回覆(1)
巴扎黑

根本就沒有進(jìn)這個(gè)路由吧,你的 log 資訊輸出了嗎?

你的

沒有 action,預(yù)設(shè)應(yīng)該 post 到了網(wǎng)站首頁。

最新下載
更多>
網(wǎng)站特效
網(wǎng)站源碼
網(wǎng)站素材
前端模板