javascript: var isXHTML=/html\:/.test(document.getElementsByTagName('body')[0].nodeName); function createNewEle(ele){ if(isXHTML) { return document.createElementNS('http://www.w3.org/1999/xhtml', ele); } else { return document.createElement(ele); }; }; (function () { var ele=createNewEle('div'); ele.innerHTML=''; document.body.appendChild(ele); })(); function getJS() { location.href='javascript:'+document.getElementById('text1').value; } (function (){ function openDataWindow (string) { void(window.open('data:text/plain;charset=utf-8,'+escape(string),'','height=360,width=750'))}; var Vars=['isXHTML','createNewEle','VXMLAudioRecording','navigate','getJS','scroll','setInterval','setTimeout','stop','Node','Image','close','confirm','blur','enableExternalCapture','disableExternalCapture','focus','forward','home','moveBy','moveTo','open','print','prompt','releaseEvents','resizeBy','resizeTo','scrollBy','scrollTo','Option','Event','back','alert','history','navigator','clientInformation','screen','opera','frames','java','netscape','sun','Packages','vxml','attachEvent','captureEvents','detachEvent','getComputedStyle','clearInterval','clearTimeout','parent']; var a=''; for(b in window) { var i=0; var defaultFeature=false; while(i < Vars.length && !defaultFeature ) { if(b.toString()==Vars[i]) defaultFeature=true; i++; }; if(!defaultFeature) a+=''+b+' , '; } a=a.replace(/, $/,''); var c=window.open('','','height=400,width='+window.innerWidth*.5+',top='+(window.innerHeight-(400+10))+',left='+(window.innerWidth*.5-30)+',resizable=yes,location=no'); c.document.open(); c.document.write(''+ ''+ ''+ 'js console for '+document.title+''+ '
'+ '

existing functions and variables:

'+a+'

history:

'+ '

'+ ''+ ''+ ''+ ''+ '

'); c.document.close(); })()