Javascript - Listar propiedades de un objeto


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function listarPropiedades( obj ){
  2. html =""
  3. for(var i in obj){
  4. html +=('propiedad: '+i+' valor: '+obj[i])+"<br>";
  5. }
  6. popup=window.open('');
  7. popup.document.open();
  8. popup.document.write(html);
  9. popup.document.focus();
  10. popup.document.close()
  11.  
  12. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.