如何通过单击文本 (item.name) 调用此 *on_search* 函数?
$.each(docs, function(i, item) {
$('#body').append($('<div><a href="">' + item.name </a></div><br/>'));
});
// call this function whenever user clicks the text
function on_search() {
var url ='http:myhomepage/select/?wt=json&json.wrf=?&q='+item.name;
$.getJSON(url, on_text);
}