1. <body>
  2. </body>
  3. <script>
  4. document.body.style.fontSize="12px";
  5. JRefPathDiv=document.body.appendChild(document.createElement("div"));
  6. with (JRefPathDiv.style){
  7. position='';backgroundColor='ivory';border='1px solid';marginBottom='4px';padding='3px'
  8. }
  9. JRefListDiv=document.body.appendChild(document.createElement("div"));
  10. with (JRefListDiv.style){
  11. backgroundColor='ivory';border='1px solid';cursor='default';
  12. }
  13. JRefHistoryText=['window'];
  14. JRefHistory=[window];
  15. JRefHistory.pops = function (e) {
  16. for(var x = 0; x < e; x++){
  17. JRefHistory.pop()
  18. JRefHistoryText.pop()
  19. }
  20. }
  21. JRefListDraw();
  22. function JRefListDraw(target){
  23. var add,writeStrig=[''];
  24. if(target) {
  25. JRefHistoryText.push(target);
  26. JRefHistory.push(target = JRefHistory[JRefHistory.length-1][target]);
  27. }
  28. obj = JRefHistory[JRefHistory.length-1];
  29. if(JRefHistory.length>1)writeStrig.push('<tr><td 1 onclick="JRefHistory.pops(1);JRefListDraw()">¡è..</td></tr>');
  30. for(var s in obj){
  31. try{
  32. for(var tmp=false in obj[s]) {tmp=true;break;}
  33. if(tmp) {
  34. add = '2 onclick="JRefListDraw(\''+s+'\');" title="'+'" ><b';
  35. }else {
  36. add='3 style=color:blue';
  37. }
  38. if(obj[s] == window) add = '4>(win)<tmp';
  39. inValue=(obj[s]+'').replace(/</g,"&lt;");//alert(inValue)
  40. }catch(e){add='5'; inValue='';}
  41. writeStrig.push('<tr><td valign=top '+add+' >'+s+'</td><td>'+inValue+'</textarea></td></tr>');
  42. }
  43. JRefListDiv.innerHTML = '<table width=100% cellspacing=0 cellpading=0 style=table-layout:fixed><tr><td width=30%>À̸§</td><td width=70%>°ª</td></tr>'+writeStrig.sort().join('')+"</table>";
  44. JRefPathDraw();
  45. }
  46. function JRefPathDraw(target){
  47. var str=[];
  48. for (var x=0;x < JRefHistoryText.length; x++){
  49. str.push('<a ondblclick="JRefHistory.pops('+(JRefHistoryText.length-x-1)+');JRefListDraw()">'+JRefHistoryText[x]+'</a>');
  50. }
  51. JRefPathDiv.innerHTML= "PATH : " +str.join('.');
  52. }
  53. </script>