contoh $.each ()

//each1 start
$.each(data.data, function(k,v){

  var html = "<tr><td>"+"No111"+"</td>";
                    html += "<td>"+v.kota+"</td>";
                    html += "<td>"+"action111"+"</td></tr>";
                  $("#showdata").append(html);

  });
 //each1 end


 //each2 start
var obj = {
 "flammable": "inflammable",
 "duh": "no duh"
 };

$.each( obj, function( key, value ) {
 alert( key + ": " + value );
});
//each2 end


http://api.jquery.com/jquery.each/


https://www.sitepoint.com/jquery-each-function-examples/

0 Response to "contoh $.each ()"

Posting Komentar