茄子在线看片免费人成视频,午夜福利精品a在线观看,国产高清自产拍在线观看,久久综合久久狠狠综合

    <s id="ddbnn"></s>
  • <sub id="ddbnn"><ol id="ddbnn"></ol></sub>

  • <legend id="ddbnn"></legend><s id="ddbnn"></s>

    hta實現(xiàn)的笨狼樹狀節(jié)點查看器
    來源:易賢網(wǎng) 閱讀:939 次 日期:2016-06-24 10:52:57
    溫馨提示:易賢網(wǎng)小編為您整理了“hta實現(xiàn)的笨狼樹狀節(jié)點查看器”,方便廣大網(wǎng)友查閱!

    <html>

    <head>

    <style>

    table

    {

        border-collapse: collapse;

        border-width: 4; 

        border-style: double; 

        border-color:#15336f;

        font-size:12px;

    }

    body

    {

        font-size:12px;

    }

    div

    {

        width:100%;

        height:9; 

        border-style:solid; 

        border-width:1; 

        border-color:#eeeeee;    

        vertical-align:top;

        font-size:12;

        cursor:hand;

    }

    </style>

    <title>笨狼樹狀節(jié)點查看器</title>

    </head>

    <body>

     <input type=file id=file1 name=file1>請輸入xml文件路徑

     <input type=button value=確定 onclick = vbs:analyse >

     <select id=select1 onchange=vbs:analyse>

            <option value=nodename >顯示標簽</option>

            <option  value=text >顯示文字</option>

            <option  value=attribute >顯示屬性</option>

            <option  value=xpath >顯示xpath</option>

    </select>

    <div id=olist style=padding-left:0></div>

    </body>

     <script language=vbscript >

        '**************************************

        '****作者:    超級大笨狼 superdullwolf****

        '**************************************        

            public dic,favour,anything    ,doc      

            set doc = createobject(microsoft.xmldom)        

            doc.async=false

        sub analyse()

                dim mytr 

                favour = select1.value

                removediv  

                if not doc.load(file1.value) then 

                    alert 文件加載失敗,請檢查文件是否存在!    

                else

                    set rootnode = doc.documentelement

                    set rootdiv = document.createelement(div)    

                    rootdiv.setattribute xpath,rootnode.nodename 

                    olist.setattribute xpath,rootnode.nodename                  

                    olist.setattribute parsed,false

                    appenddiv     olist,rootnode    

                end if

        end sub

        sub appenddiv(mydiv,mynode)    

            dim mychild    ,newdiv,childid,thisid ,childxpath

            for each mychild in mynode.childnodes

                if     mychild.nodename <> #text    then    

                    set newdiv = document.createelement(div)            

                    mydiv.appendchild    newdiv            

                    addpx newdiv, mydiv,10    '縮進10象素

                    childid = 0

                    childxpath = mydiv.getattribute(xpath) & / & mychild.nodename & [ & childid & ]    

                    do while not doc.selectsinglenode(childxpath) is mychild

                        childid=childid+1

                        childxpath = mydiv.getattribute(xpath) & / & mychild.nodename & [ & childid & ]    

                    loop

                    newdiv.setattribute xpath,childxpath 

                    newdiv.setattribute parsed,false    '子元素還沒標記過了。

                    newdiv.title = newdiv.getattribute(xpath) 

                    newdiv.innertext = gettext(mychild,newdiv) 

                    if mychild.childnodes.length>0 then 

                            newdiv.attachevent onclick,getref(attachonclick)

                    end if

                end if                     

            next

            mydiv.setattribute parsed,true'所有子元素都標記過了。

        end sub    

        sub removediv()             

            dim olddiv

            for each  olddiv in   olist.childnodes          

                   olddiv.removenode(true)             

             next     

        end sub

        sub attachonclick()

            dim obj    ,nodexpath,cdiv

            set obj=window.event.srcelement 

            nodexpath = obj.getattribute(xpath)

            if instr(nodexpath,#text) >0 then 

                window.event.cancelbubble = true

                exit sub

            end if

            if not obj.getattribute(parsed)= true then     

                 appenddiv obj ,doc.selectsinglenode(nodexpath)

            else

                for each cdiv in obj.children

                    if cdiv.style.display = none then

                        cdiv.style.display = 

                    else

                        cdiv.style.display = none

                    end if

                next

            end if

            window.event.cancelbubble = true         

        end sub

        function gettext(mynode,odiv)

            dim myattribute

            gettext = 

            select case favour

                case text

                    if not isnull(mynode.text) then

                        gettext = mynode.text

                     else

                        gettext = 空文字

                     end if            

                case nodename                 

                        gettext = mynode.nodename    

                case attribute    

                    if mynode.nodename <>#text then

                        for each myattribute in  mynode.attributes                         

                            gettext =gettext &  myattribute.name

                            gettext = gettext & = & chr(34) 

                            gettext = gettext & myattribute.value  & chr(34) &  

                        next

                        gettext = trim(gettext)

                    end if

                case xpath

                    gettext = odiv.title

            end select

            if trim(gettext) = then gettext =空

        end function

        sub addpx(newdiv,olddiv,num)

            dim re,mystring    

            set re = new regexp

            re.global = true

            re.pattern = [^\d]*            

            mystring =  re.replace(olddiv.style.paddingleft, )

            if mystring = then mystring = 0

            mystring = (cint(mystring) + num ) & px

            newdiv.style.paddingleft = mystring

            set re = nothing

        end sub

     </script>

    </html>

    更多信息請查看網(wǎng)絡編程
    易賢網(wǎng)手機網(wǎng)站地址:hta實現(xiàn)的笨狼樹狀節(jié)點查看器

    2026上岸·考公考編培訓報班

    • 報班類型
    • 姓名
    • 手機號
    • 驗證碼
    關于我們 | 聯(lián)系我們 | 人才招聘 | 網(wǎng)站聲明 | 網(wǎng)站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點 | 投訴建議
    工業(yè)和信息化部備案號:滇ICP備2023014141號-1 云南省教育廳備案號:云教ICP備0901021 滇公網(wǎng)安備53010202001879號 人力資源服務許可證:(云)人服證字(2023)第0102001523號
    聯(lián)系電話:0871-65099533/13759567129 獲取招聘考試信息及咨詢關注公眾號:hfpxwx
    咨詢QQ:1093837350(9:00—18:00)版權所有:易賢網(wǎng)