0

嗨,我正在 VS 2012 中使用 HTML5 和 Javascript 开发一个 windows8 应用程序。

我需要提供搜索功能,就像用户在搜索栏中搜索任何内容时,数据应显示在搜索自动完成中。数据以 JSON 格式提供,点击此 URL“http://healthkartplus.com/webservices/search/both?name=crocin”并获得结果。如果有人知道,请帮助我。

以下是我在搜索栏中搜索 crocin 时的结果。我想要这个 JSON 的结果数据。

    {"status":0,"errors":null,"op":"searching","result":[{"id":26725,"mfId":55078,"label":"Crocin (1000 mg) 40 Tablet(Glaxo Smithkline Pharmaceuticals Ltd.)","name":"Crocin (1000 mg)","type":"drugs","packSize":"40 Tablet","manufacturer":"Glaxo Smithkline Pharmaceuticals Ltd."},{"id":27050,"mfId":55078,"label":"Crocin (15 ml) 15 ml(Glaxo Smithkline Pharmaceuticals Ltd.)","name":"Crocin (15 ml)","type":"drugs","packSize":"15 ml","manufacturer":"Glaxo Smithkline Pharmaceuticals Ltd."},{"id":26696,"mfId":55078,"label":"Crocin (500 mg) 15 Tablet(Glaxo Smithkline Pharmaceuticals Ltd.)","name":"Crocin (500 mg)","type":"drugs","packSize":"15 Tablet","manufacturer":"Glaxo Smithkline Pharmaceuticals Ltd."},{"id":27014,"mfId":55078,"label":"Crocin (60 ml) 60 ml(Glaxo Smithkline Pharmaceuticals Ltd.)","name":"Crocin (60 ml)","type":"drugs","packSize":"60 ml","manufacturer":"Glaxo Smithkline Pharmaceuticals Ltd."},{"id":26780,"mfId":55078,"label":"Crocin (650 mg) 10 Tablet(Glaxo Smithkline Pharmaceuticals Ltd.)","name":"Crocin (650 mg)","type":"drugs","packSize":"10 Tablet","manufacturer":"Glaxo Smithkline Pharmaceuticals Ltd."},{"id":26933,"mfId":55078,"label":"Crocin DS (60 ml) 60 ml(Glaxo Smithkline Pharmaceuticals Ltd.)","name":"Crocin DS (60 ml)","type":"drugs","packSize":"60 ml","manufacturer":"Glaxo Smithkline Pharmaceuticals Ltd."},{"id":27035,"mfId":55078,"label":"Crocin Paed (15 ml) 15 ml(Glaxo Smithkline Pharmaceuticals Ltd.)","name":"Crocin Paed (15 ml)","type":"drugs","packSize":"15 ml","manufacturer":"Glaxo Smithkline Pharmaceuticals Ltd."},{"id":64010,"mfId":55078,"label":"Crocin Pain Relief Tab   10 x 1(Glaxo Smithkline Pharmaceuticals Ltd.)","name":"Crocin Pain Relief Tab  ","type":"drugs","packSize":"10 x 1","manufacturer":"Glaxo Smithkline Pharmaceuticals Ltd."},{"id":26733,"mfId":55078,"label":"Crocin Quik (500 mg) 10 Tablet(Glaxo Smithkline Pharmaceuticals Ltd.)","name":"Crocin Quik (500 mg)","type":"drugs","packSize":"10 Tablet","manufacturer":"Glaxo Smithkline Pharmaceuticals Ltd."}],"hasMore":false,"suggestions":[]}
4

1 回答 1

1

搜索合同示例应用程序显示了如何执行此操作。

于 2012-11-02T19:02:43.613 回答