JavaScript get 请求参数带有?,怎么处理

ane · 2014年03月10日 · 最后由 dorentus 回复于 2014年03月10日 · 2112 次阅读

本来是 node 中的代码。无奈 node 社区登不上去

<a href="u/刘宏庆/2014-3-10/What's the  Rails' Polymorphic Associations?">What's the  Rails' Polymorphic Associations?</a>

app.get('/u/:name/:day/:title', function (req, res) )

这样处理似乎 req.params.title 会去掉?。暂时不知道如何处理,赶脚是要转码?还是什么

转一下码是一下:CGI::escape('your url')

匿名 #4 2014年03月10日

EncodeURIComponent(

需要 登录 后方可回复, 如果你还没有账号请 注册新账号