test

   public class HelloWorld{
         private string connString;
    public static void main(String[] arg){
         }
      .......................
    }


<html>
<head>
<script language=javascript>

  function test(s){
  var flag = 'row' + s;
  for(var i = 0;i<document.all.length;i++){
    if(flag == (document.all[i].id))
     if (document.all[i].style.display=="") {
      document.all[i].style.display="none";
     } else{
      document.all[i].style.display="";
     }
   }
  }
</script>
</head>
<body>
<form name="form1">
 <input id="x" type="text">
<div style="CURSOR: hand" onclick="test('1');"><IMG id=level1 src="images/minus.gif">public class HelloWorld{</div>
 <ul id=row1>
  <li>private string connString;
 
  <div style="CURSOR: hand" onclick="test('2');"><IMG id=level2 src="images /plus.gif">public static void main(String[] arg){
</div>
  <ul id=row2 style="display:none">
   {...}
  </ul>
  <li>Other
 </ul>
</form>
</body>
</html>


 

posted @ 2009-07-31 16:11  kelin1314  阅读(158)  评论(0编辑  收藏  举报