标签:complete jquery res his cts drag blog ack highlight
public function rest() { $q = $this->request->get(‘q‘); $dicts = Db::name($this->table)->where(‘dvalue‘,‘like‘,‘%‘.$q.‘%‘)->field(‘dvalue‘)->select(); return json(data2arr($dicts,‘dvalue‘)); }
require([‘jqueryui1121‘, ‘dragpanel‘], function () { dragpanel.init(); $(‘.packing‘).autocomplete({ source: function( request, response ) { $.ajax({ url: ‘{:url("admin/dict/rest")}‘, data: { q: request.term }, success: function( data ) { response( data ); } }); } }); });
标签:complete jquery res his cts drag blog ack highlight
原文地址:http://www.cnblogs.com/meetrice/p/7821306.html