Javascript Notes

From Federal Burro of Information
Revision as of 01:08, 22 September 2013 by David (talk | contribs)
Jump to navigationJump to search
function showattrs(theObject) {
   var out="<pre>"
   for (var attr in theObject) {
      out+=attr+":"+ theObject[attr]+"\n"
   }
   out+="</pre>"
 
   var block = document.getElementById("showattrs")
   block.innerHTML=out
}


    if ( console && console.log ) {
      console.log( "Sample of data:", data.slice( 0, 100 ) );
    }

        for ( var key in keys(data).sort) {
            elem.html = elem.html . key;
        }

Also see jquery notes