📌  相关文章
📜  获取查询字符串 javascript nodejs - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:27.930000             🧑  作者: Mango

代码示例1
const querystring = require('querystring');
const url = "http://example.com/index.html?code=string&key=12&id=false";
const qs = "code=string&key=12&id=false";

console.log(querystring.parse(qs));
// > { code: 'string', key: '12', id: 'false' }

console.log(querystring.parse(url));