Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $("#ktasal").autocomplete({
- minLength: 2,
- source:function(req, tbh){
- $.ajax({
- url: "http://api.jne.co.id:8889/iframe/server/server_city.php",
- dataType: 'html',
- type: 'GET',
- data:
- {
- term: req.term,
- },
- success:
- function(data){
- console.log(data.code);
- },
- });
- },
- select: function( event, ui ) {
- $('#result').empty();
- $('#result').append("<input type='text' id='id_kota' name='id_kota' value='" + ui.item.id + "' size='10' />");
- },
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement