关于div的定位显示问题




代码如下:

  1 None.gif
  2 None.gif
  3 None.gif
  4 None.gif
  5 None.gif < html >
  6 None.gif     < head >
  7 None.gif         < title > NetShop Management Category Add Panel
  8 None.gif         </ title >
  9 None.gif         < meta  http-equiv =Expires  content =0 >  
 10 None.gif < meta  http-equiv =Pragma  content =no-cache >  
 11 None.gif < meta  http-equiv =Cache-Control  content =no-cache >  
 12 None.gif         < meta  http-equiv ="Content-Type"  content ="text/html; charset=utf-8" >
 13 None.gif         < link  type ="text/css"  rel ="stylesheet"  href ="css/xtree2.css" >
 14 None.gif         < script  type ="text/javascript"  src ="js/xtree2.js" ></ script >
 15 None.gif         <!--  xloadtree2.js文件依赖xtree2.js文件   -->
 16 None.gif         < script  type ="text/javascript"  src ="js/xloadtree2.js" ></ script >
 17 ExpandedBlockStart.gifContractedBlock.gif         < script > dot.gif
 18InBlock.gif function showTree(a)
 19ExpandedSubBlockStart.gifContractedSubBlock.gifdot.gif{
 20InBlock.gif    document.getElementById('divTree').style.display = "block";
 21InBlock.gif    document.getElementById('divTree').style.left=a.offsetLeft+'px'
 22InBlock.gif    document.getElementById('divTree').style.top=a.offsetTop+ a.offsetHeight+'px'
 23ExpandedSubBlockEnd.gif}

 24InBlock.giffunction hideTree(a)
 25ExpandedSubBlockStart.gifContractedSubBlock.gifdot.gif{
 26InBlock.gif    document.getElementById('divTree').style.display="none";
 27ExpandedSubBlockEnd.gif}

 28InBlock.giffunction insertValue(oNode)
 29ExpandedSubBlockStart.gifContractedSubBlock.gifdot.gif{
 30InBlock.gif    document.getElementById('parentCategoryName').value = oNode.text;
 31InBlock.gif    document.getElementById('parentCategoryId').value = oNode.id;
 32InBlock.gif    document.getElementById('divTree').style.display = "none";
 33InBlock.gif    //alert(oNode.id);
 34ExpandedSubBlockEnd.gif}

 35ExpandedBlockEnd.gif 
</ script >
 36 None.gif     </ head >
 37 None.gif     < body >
 38 None.gif         < form  name ="categoryForm"  method ="post"  action ="/NetShop/manage/categoryAdd.do" >
 39 None.gif             < br  />
 40 None.gif             < br  />
 41 None.gif             < table  border ="1"  cellpadding ="4"  cellspacing ="0"  width ="600"
 42 None.gif                align ="center" >
 43 None.gif                 < tr >
 44 None.gif                     < td ></ td >
 45 None.gif                     < td ></ td >
 46 None.gif                     < td ></ td >
 47 None.gif                 </ tr >
 48 None.gif                 < tr >
 49 None.gif                     < td >
 50 None.gif                        Select Parent Category Name:
 51 None.gif                     </ td >
 52 None.gif                     < td >
 53 None.gif                         < input  type ="text"  name ="parentCategoryName"  value =""  onfocus ="showTree(this);" >
 54 None.gif                     </ td >
 55 None.gif                     < td >
 56 None.gif                        
 57 None.gif                     </ td >
 58 None.gif                 </ tr >
 59 None.gif                 < tr >
 60 None.gif                     < td >
 61 None.gif                        Category Name:
 62 None.gif                     </ td >
 63 None.gif                     < td >
 64 None.gif                         < input  type ="text"  name ="categoryName"  value ="" >
 65 None.gif                     </ td >
 66 None.gif                     < td >
 67 None.gif                        
 68 None.gif                     </ td >
 69 None.gif                 </ tr >
 70 None.gif                 < tr >
 71 None.gif                     < td >
 72 None.gif                        Description:
 73 None.gif                     </ td >
 74 None.gif                     < td >
 75 None.gif                         < textarea  name ="categoryDescription" ></ textarea >
 76 None.gif                     </ td >
 77 None.gif                     < td >
 78 None.gif                        
 79 None.gif                     </ td >
 80 None.gif                 </ tr >
 81 None.gif                 < tr >
 82 None.gif                     < td >
 83 None.gif                        Status:
 84 None.gif                     </ td >
 85 None.gif                     < td >
 86 None.gif                         < select  name ="categoryStatus"  size ="1" >< option  value ="NORMAL" > Normal </ option >
 87 None.gif                             < option  value ="LOCKED" > Locked </ option >
 88 None.gif                             < option  value ="DELETED" > Deleted </ option ></ select >
 89 None.gif
 90 None.gif                     </ td >
 91 None.gif                     < td >
 92 None.gif                        
 93 None.gif                     </ td >
 94 None.gif                 </ tr >
 95 None.gif             </ table >
 96 None.gif             < input  type ="hidden"  name ="parentCategoryId"  value ="" >
 97 None.gif            
 98 None.gif             < br  />
 99 None.gif            
100 None.gif             < br  />
101 None.gif             < br  />
102 None.gif             < input  type ="submit"  value ="Submit" >
103 None.gif             < input  type ="submit"  name ="org.apache.struts.taglib.html.CANCEL"  value ="Reset"  onclick ="bCancel=true;" >
104 None.gif         </ form >
105 None.gif         < div  id ="divTree"
106 None.gif            style ="overflow-y:auto;height:200px;width:70px;display:none;position:relative;background-color:#FFF;z-index:1000;border-style:solid;border-color:#ACAA9C;border-width:1px" >
107 ExpandedBlockStart.gifContractedBlock.gif             < script  type ="text/javascript" > dot.gif
108InBlock.gifvar tree=new WebFXLoadTree("dictionaries","dictionaries.xml");
109InBlock.gifvar ti0 = new WebFXTreeItem("Item 0");
110InBlock.giftree.add(ti0);
111InBlock.giftree.write();
112ExpandedBlockEnd.giftree.expand();
113None.gif
</ script >
114 None.gif         </ div >
115 None.gif     </ body >
116 None.gif </ html >
117 None.gif
118 None.gif

改了后:

  1 None.gif
  2 None.gif
  3 None.gif
  4 None.gif
  5 None.gif < html >
  6 None.gif     < head >
  7 None.gif         < title > NetShop Management Category Add Panel
  8 None.gif         </ title >
  9 None.gif         < meta  http-equiv =Expires  content =0 >  
 10 None.gif < meta  http-equiv =Pragma  content =no-cache >  
 11 None.gif < meta  http-equiv =Cache-Control  content =no-cache >  
 12 None.gif         < meta  http-equiv ="Content-Type"  content ="text/html; charset=utf-8" >
 13 None.gif         < link  type ="text/css"  rel ="stylesheet"  href ="css/xtree2.css" >
 14 None.gif         < script  type ="text/javascript"  src ="js/xtree2.js" ></ script >
 15 None.gif         <!--  xloadtree2.js文件依赖xtree2.js文件   -->
 16 None.gif         < script  type ="text/javascript"  src ="js/xloadtree2.js" ></ script >
 17 ExpandedBlockStart.gifContractedBlock.gif         < script > dot.gif
 18InBlock.gif function showTree(a)
 19ExpandedSubBlockStart.gifContractedSubBlock.gifdot.gif{
 20InBlock.gif    document.getElementById('divTree').style.display ="";
 21InBlock.gif    document.getElementById('divTree').style.left=a.offsetLeft+'px'
 22InBlock.gif    document.getElementById('divTree').style.top=a.offsetTop+ a.offsetHeight+'px'
 23ExpandedSubBlockEnd.gif}

 24InBlock.giffunction hideTree(a)
 25ExpandedSubBlockStart.gifContractedSubBlock.gifdot.gif{
 26InBlock.gif    document.getElementById('divTree').style.display="none";
 27ExpandedSubBlockEnd.gif}

 28InBlock.giffunction insertValue(oNode)
 29ExpandedSubBlockStart.gifContractedSubBlock.gifdot.gif{
 30InBlock.gif    document.getElementById('parentCategoryName').value = oNode.text;
 31InBlock.gif    document.getElementById('parentCategoryId').value = oNode.id;
 32InBlock.gif    document.getElementById('divTree').style.display = "none";
 33InBlock.gif    //alert(oNode.id);
 34
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值