CNode
查看回复

回复 (4)

C
chinghanho#1·11 年前

req.query

An object containing a property for each query string parameter in the route. If there is no query string, it is the empty object, {}.

http://expressjs.com/api.html#req.query

D
DevinXian#2·11 年前
引用 chinghanhoreq.query An object containing a property for each query string parameter in the route. If there...

@chinghanho 正解,不管你是req的method是POST还是GET,url中的参数都被解析到req.query里去了。可以自己使用url模块实验下...如果没记错,url里面也用的是querystring...@HyperJianXin

J
jx-zhou#3·11 年前

路由和正常的一样,后面的可以作为传入参数在req参数中。

H
HyperJianXin#4·11 年前

URl.png

参与回复
登录后即可参与回复。登录