Creo en nosotros. Wikipedia.
ShareCode
Permalink: http://www.treeweb.es/u/974/ 01/02/2011

ShareCode

1 2 3 4 window.addEventListener('load', inicializar, false);5 6 7 function inicializar(event) {8  9  var iframe = document.createElement('iframe');10  iframe.addEventListener('load', paginaCargada, false);11  window.document.body.appendChild(iframe);12  13  14  //iframe.setAttribute('src', 'http://www.google.es/');15  16  //window.document.body.innerHTML = 'hola';17 }18 19 20 function paginaCargada(event) {21  22  window.document.body.innerHTML = analizer(this);23  //if (this instanceof Object) alert('es objeto');24  25  26 }27 28 function analizer(object) {29  30  // calculo el tipo31  var tipo_objeto = typeof object;32  // calculo la clase33  var clase = '';34  var arr = object.constructor.toString().match(/function\s*(\w+)/);35  if (arr && arr.length == 2) clase = 'olaaaaaaaa'+arr[1];36  37  var r = '['+tipo_objeto;38  /*if (clase != '')*/ r += ':'+clase;39  r += ']';40  41  return object + r;42  43  /*44  45  46  47  s = '<div style="padding-left:24px;">';48  for (key in object) {49  s += '<div><b>' + key + '</b>';50  s += typeof object[key];51  52  53  54  55  56  57  s += '</div>';58  }59  s += '</div>';60  return s;*/61  62 }63 64 


Este ShareCode tiene versiones:
  1. ... (24/04/2013)
Enlace
El enlace para compartir es: