我正在使用 Jquery token 输入。我需要知道如何使用 queryParam 传递附加参数。
脚本:
$("#demo-input").tokenInput("/MaterialService/GetMaterials",
{
queryParam: 'q',
tokenLimit: 1,
});
Controller :
[HttpGet]
public IQueryable<Property> GetMaterials(string q, String type)
{
//Code for the function
}
我需要访问服务 Controller 中的“GetMaterials”功能。 在我的脚本中,我有 queryParam (即“q”)和另一个参数“type”
在调用服务 Controller 时,我需要如何将“type”参数与queryParam一起传递
有人可以帮忙吗?
提前致谢:)
最佳答案
您可以尝试一下并反馈结果:
$("#demo-input").tokenInput("/MaterialService/GetMaterials?queryParam=q" + "&type=qq",
{ tokenLimit: 1, });
关于javascript - token 输入 : how to pass additional parameter with queryParam,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14597436/