/ Published in: HTML
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <!-- <link rel="search" type="application/opensearchdescription+xml" title="Snipplr" href="http://snipplr.com/snipplrsearch.xml" /> --> <!--[if lte IE 6]><script src="http://www.savethedevelopers.org/say.no.to.ie.6.js"></script><![endif]--> </head> <body id="snippets"> <div id="viewsource"> <textarea rows="25" class="copysource"> alert('hi'); /*---------------------------------------------------------------------------*/ /* expandable generic node object */ function Branch(N){var T=this;T.P='[object Tree]';T.N=T.I=T.P;if(N){T.N=N;T.I='window["'+T.N+'"]'}}; Branch.prototype.grow=function(N){ if(!N)return;var T=this;var Tt=T[N]=new Branch(); Tt.N=N; Tt.I=''+T.I+'["'+N+'"]'; Tt.P=T}; Branch.prototype.toString=function(){return this.I}; function /* a convenient preparation of a branch */ Tree(str){return window[str]=new Branch(str)} /*---------------------------------------------------------------------------*/ </textarea> </div> </body> </html>