最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

js編寫的treeview使用方法

 更新時(shí)間:2016年11月11日 09:24:24   作者:常歡jack  
這篇文章主要為大家詳細(xì)介紹了js編寫的treeview使用方法,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下

 本文實(shí)例為大家分享了treeview使用方法,供大家參考,具體內(nèi)容如下

 1.所需文件:ftiens4.js,ua.js,XMLTree.js,以及一些樹上的圖片(文件下載處:http://www.treeview.net/),圖片名字和位置如下圖

 

2.其他頁面(MainContent.aspx,NavTree.aspx)放置位置如下圖所示:


3.關(guān)鍵頁面的代碼

3.1 MainContent.aspx代碼

<%@ Page Language="C#" CodeFile="MainContent.aspx.cs" Inherits="mainContent" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
  <title>北京市城市軌道交通設(shè)施運(yùn)行狀態(tài)監(jiān)測(cè)系統(tǒng)</title>
  <link rel="Shortcut Icon" href="Resources/Images/iehead.ico" />
  <link rel="Bookmark" href="Resources/Images/iehead.ico" />
  <script type="text/javascript">
  function op()
  {
   // This function is for folders that do not open pages themselves.
   // See the online instructions for more information.
  }
 </script>
</head>
 <frameset cols="250,10,*" border="0" frameSpacing="0" frameBorder="no" id="tree_frm">
   <frame src="navTree.Aspx" name="treeframe" noResize>
   <frame src="treeControl.htm" name="ctr_frm" id="ctr_frm" noResize scrolling="no">
   <frame src="#" name="mainGisWindow" id="basefrm" noResize>
 </frameset>
</html>

3.2 NavTree.aspx代碼

<%@ Page Language="C#" CodeFile="NavTree.aspx.cs" Inherits="navTree" %>


<html >
<head runat="server">
  <title>北京市城市軌道交通設(shè)施運(yùn)行狀態(tài)監(jiān)測(cè)系統(tǒng)</title>
  
<script src="Resources/JS/Tree/ua.js" type="text/javascript" language="javascript"></script>
 <!-- Infrastructure code for the TreeView. DO NOT REMOVE.  -->
 
<script src="Resources/JS/Tree/ftiens4.js" type="text/javascript" language="javascript"></script>
 <!-- Scripts that define the tree. DO NOT REMOVE.      -->
<script src="Resources/JS/Tree/XMLTree.js" type="text/javascript" language="javascript"></script>
  <%
   //Common.Utility.WebUtility.validLoning(Session, Response);
   string fileName = null;
   //Bussiness.Login.User loginUser = (Bussiness.Login.User)Session["currentUser"];
   string departmentid = "";
   if (Session["navItem"] != null)
   {
     string item = (string)Session["navItem"];

     if (item.ToUpper().Equals("Safety".ToUpper()))
     {
       fileName = "'SafetyTree.xml'";
       //departmentid = loginUser.department.depId;
     }
     else if (item.ToUpper().Equals("Gis".ToUpper()))
     {
       fileName = "'GisTree.xml'";
     }
     else if (item.ToUpper().Equals("DataQuality".ToUpper()))
     {
       fileName = "'DataQualityTree.xml'";
     }
     else if (item.ToUpper().Equals("StateAnalysis".ToUpper()))
     {
       fileName = "'StateAnalysisTree.xml'";
     }
     else if (item.ToUpper().Equals("SynthesisTechnique".ToUpper()))
     {
       fileName = "'SynthesisTechniqueTree.xml'";
     }
     else if (item.ToUpper().Equals("DataMaintenance".ToUpper()))
     {
       fileName = "'DataMaintenanceTree.xml'";
     }
   }   
   %>
<script type="text/javascript">
  var xmlfile = "Resources/XML/Tree/"+<%=fileName %>;
  departmentid= '<%=departmentid %>';
  ICONPATH = 'Resources/Images/tree/';
  contentFrame = window.parent.document.getElementByIdx_x_x("basefrm");
  loadTreeFromXml(xmlfile);
</script>
  <style>
  BODY
   {
   
    background-image:url(/ESM/Resources/Images/DapHangNew.jpg);
    background-repeat:repeat-x;
   }
  TD {
   font-size: 10pt;
   font-family: verdana,helvetica;
   text-decoration: none;
   white-space:nowrap;}
  A {
   text-decoration: none;
   color: black;
   
   }
   
  .specialClass {
   font-family:garamond;
   font-size:10pt;
   color:Black;
   font-weight:lighter;
   text-decoration:underline
   }
 </style>
</head>
<body topmargin="16" marginheight="16">
  <!------------------------------------------------------------->
 <!-- IMPORTANT NOTICE:                    -->
 <!-- Removing the following link will prevent this script  -->
 <!-- from working. Unless you purchase the registered    -->
 <!-- version of TreeView, you must include this link.    -->
 <!-- If you make any unauthorized changes to the following  -->
 <!-- code, you will violate the user agreement. If you want -->
 <!-- to remove the link, see the online FAQ for instructions -->
 <!-- on how to obtain a version without the link.      -->
 <!------------------------------------------------------------->

<!--下面的一定不能刪,刪了就會(huì)有問題-->
<DIV style="position:absolute; top:0; left:0; display:none;"><TABLE border=0><TR><TD><FONT size=-2><A style="font-size:7pt;text-decoration:none;color:silver"  target=_blank>Javascript Tree Menu</A></FONT></TD></TR></TABLE></DIV>
 <!-- Build the browser's objects and display default view -->
 <!-- of the tree.                     -->
 <script>
 initializeDocument();
 </script>
</body>
</html>

3.3 treeControl.aspx代碼(它的作用就是樹和右邊頁面的分隔欄,可以隱藏樹)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
  <script type="text/javascript" language="javascript">
    var LEFT_MENU_VIEW=1;
    function leftmenu_ctrl()
    {
     if(LEFT_MENU_VIEW==0)
     {
      parent.tree_frm.cols="250,10,*";
      LEFT_MENU_VIEW=1;
      myarrow.src="/ESM/Resources/Images/topleft.gif"; //左箭頭
     }
     else
     {
      parent.tree_frm.cols="0,10,*";
      LEFT_MENU_VIEW=0;
      myarrow.src="/ESM/Resources/Images/topright.gif"; //右箭頭
     }
    }
  </script>

</head>
<body style="background-color:#F1F8FC;">
  <div id="AdLayer" style="position:absolute;width:60px; height:21px; z-index:20;visibility:visible;left:0%; top:40%;">
    <div id="oa_tree" onclick="leftmenu_ctrl();" title="隱藏工具欄" style="cursor:pointer;"><img id="myarrow" src="/ESM/Resources/Images/topleft.gif" alt="" /></div>
  </div>
</body>
</html>

[over]

這樣就成了。

以上就是本文的全部內(nèi)容,希望對(duì)大家的學(xué)習(xí)有所幫助,也希望大家多多支持腳本之家。

相關(guān)文章

  • 詳解JavaScript的定時(shí)器

    詳解JavaScript的定時(shí)器

    這篇文章主要為大家介紹了JavaScript的定時(shí)器 ,具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下,希望能夠給你帶來幫助
    2021-11-11
  • js實(shí)現(xiàn)輪播圖的完整代碼

    js實(shí)現(xiàn)輪播圖的完整代碼

    這篇文章主要為大家詳細(xì)介紹了js實(shí)現(xiàn)輪播圖的完整代碼,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2018-08-08
  • 詳解JavaScript原型與原型鏈

    詳解JavaScript原型與原型鏈

    這篇文章主要介紹了JavaScript原型與原型鏈的相關(guān)資料,幫助大家更好的理解和學(xué)習(xí)JavaScript,感興趣的朋友可以了解下
    2020-11-11
  • javascript格式化json顯示實(shí)例分析

    javascript格式化json顯示實(shí)例分析

    這篇文章主要介紹了javascript格式化json顯示,實(shí)例分析了javascript操作json格式化的相關(guān)技巧,非常具有實(shí)用價(jià)值,需要的朋友可以參考下
    2015-04-04
  • js報(bào)$ is not a function 的問題的解決方法

    js報(bào)$ is not a function 的問題的解決方法

    在html中的程序,跑的好好的,換成jsp在項(xiàng)目中跑,就一直報(bào)$ is not a function錯(cuò),針對(duì)此問題,下面有個(gè)不錯(cuò)的解決方法,大家可以嘗試操作下
    2014-01-01
  • JavaScript對(duì)表格或元素按文本,數(shù)字或日期排序的方法

    JavaScript對(duì)表格或元素按文本,數(shù)字或日期排序的方法

    這篇文章主要介紹了JavaScript對(duì)表格或元素按文本,數(shù)字或日期排序的方法,涉及javascript頁面元素操作及排序的相關(guān)技巧,需要的朋友可以參考下
    2015-05-05
  • swiper自定義分頁器使用方法詳解

    swiper自定義分頁器使用方法詳解

    這篇文章主要為大家詳細(xì)介紹了swiper自定義分頁器的使用方法,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下
    2017-12-12
  • ES6新數(shù)據(jù)結(jié)構(gòu)Set與WeakSet用法分析

    ES6新數(shù)據(jù)結(jié)構(gòu)Set與WeakSet用法分析

    這篇文章主要介紹了ES6新數(shù)據(jù)結(jié)構(gòu)Set與WeakSet用法,結(jié)合實(shí)例形式簡單分析了Set與WeakSet的功能、使用方法及相關(guān)注意事項(xiàng),需要的朋友可以參考下
    2017-03-03
  • Typescript中extends關(guān)鍵字的基本使用

    Typescript中extends關(guān)鍵字的基本使用

    extends表示具體的泛型類型只能是object類型,某個(gè)變量如果能斷言成object類型[變量as object],那么這個(gè)變量的類型符合T extends object,下面這篇文章主要給大家介紹了關(guān)于Typescript中extends關(guān)鍵字基本使用的相關(guān)資料,需要的朋友可以參考下
    2022-08-08
  • Bootstrap Table使用方法詳解

    Bootstrap Table使用方法詳解

    這篇文章主要為大家詳細(xì)介紹了JS組件Bootstrap Table使用方法,具有一定的實(shí)用性和參考價(jià)值,感興趣的小伙伴們可以參考一下
    2016-08-08

最新評(píng)論

巴中市| 安塞县| 新泰市| 郑州市| 涪陵区| 怀仁县| 湖州市| 广东省| 梅河口市| 西乌珠穆沁旗| 浪卡子县| 泗洪县| 肇东市| 海阳市| 水城县| 昌吉市| 香港| 安阳县| 香河县| 斗六市| 定南县| 灵石县| 称多县| 玉屏| 新建县| 高雄县| 怀集县| 京山县| 宁南县| 宜兴市| 万州区| 长沙市| 邵阳县| 南澳县| 扎鲁特旗| 华阴市| 阳西县| 报价| 通山县| 墨竹工卡县| 江北区|