How to select value programmatically with MagicSearch jQuery Plugin?
问题 I am using this jQuery plugin MagicSearch How can I programatically select a value (by ID for example)? 回答1: This is what I have. After a careful analysis of their callback functions, I have devised a method to extract the ID and Name from my search list. Please find the code to my attempt: <script> var idList=""; var nameList = ""; $(function () { var dataSource = "[{\"id\":1,\"name\":\"test\"}, {\"id\":2,\"name\":\"example\"},{\"id\":3,\"name\":\"image\"}, {\"id\":4,\"name\":\"election\"},{