Inspect and object and show properies and methods in a new window


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



Copy this code and paste it in your HTML
  1. function inspect(obj) {
  2. var str = '';
  3. for (var k in obj)
  4. str += 'obj.' + k + ' = ' + obj[k] + '<br>';
  5. (window.open('about:blank')).document.write(str);
  6. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.