我有一个类似于下面的物体
const params = {
token: '78fe6df3f',
id: '12345',
price: 0 - '9,000,000',
'area[]': 'Applehead Island',
'waterfront_type[]': 'Open Water',
property_type_single: 'Single Family/Site Built',
bedrooms: '0 - 5',
baths: '0 - 5',
sqft: '0 - 7500'
};
我想把这个物体变成下面这样
https://www.example.com/properties.php?token=78fe6df3f&id=12345&price=$0%20-%20$3,480,000&area[]=Applehead%20Island&waterfront_type[]=Open%20Water&property_type_single=Single%20Family/Site%20Built&bedrooms=0%20-%205&baths=0%20-%205&sqft=0%20-%207500
我怎样才能把这个放进你的房间。在javascript中
$.param(obj)
做这个工作。请引导我。
我想做上述的反应本机获取调用。对象将由筛选器窗体生成。