• linkedu视频
  • 平面设计
  • 电脑入门
  • 操作系统
  • 办公应用
  • 电脑硬件
  • 动画设计
  • 3D设计
  • 网页设计
  • CAD设计
  • 影音处理
  • 数据库
  • 程序设计
  • 认证考试
  • 信息管理
  • 信息安全
菜单
linkedu.com
  • 网页制作
  • 数据库
  • 程序设计
  • 操作系统
  • CMS教程
  • 游戏攻略
  • 脚本语言
  • 平面设计
  • 软件教程
  • 网络安全
  • 电脑知识
  • 服务器
  • 视频教程
  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell
您的位置:首页 > 脚本语言 >hta/htc > DOM浏览器(方便需要dom操作的朋友)

DOM浏览器(方便需要dom操作的朋友)

作者: 字体:[增加 减小] 来源:互联网

通过本文主要向大家介绍了浏览器端执行dom操作,浏览器dom,dom西班牙乳胶枕头,dom制作流程,dom手表等相关知识,希望对您有所帮助,也希望大家支持linkedu.com www.linkedu.com

Open a folder view, launch this application, click on init, it detects all instances. Just drill-down to see the properties of the objects recursively.
You can now update properties and invoke methods on running instances !

File Name : DOM_Explorer.hta
Requirement : IE 5.5 (not tested on IE5.1)
Author : Jean-Luc Antoine
Submitted : 31/10/2001
Updated : 19/11/2001
Category : HTA
Remember : The file extension has to be *.HTA

Function SP2(name,obj,RW,ObjPath) 'Properties
 Dim Chaine
 Chaine="<TR><TD>"
 If isobject(obj) Then
  If obj is Nothing Then
   If HideNull.Checked Then
    SP2=""
    exit function
   End If
   Chaine=Chaine & Name
  ElseIf VarType(obj)=0 Then
   Chaine=Chaine & Name
  Else
   Chaine=Chaine & "<a href=""#"" OnClick='vbscript:ShowProp " &_
   ObjPath & "." & name & ",""" & ObjPath & "." & name &_
   """' title='" & ObjPath & "." & name & "'>" & name & "</a>"
  End If
 Else
  Chaine=Chaine & Name
 End If
 Chaine=Chaine & "</TD><TD>" & typeName(obj) & "</TD><TD>" & RW & "</TD><TD>"

 Select Case VarType(Obj)
 Case 0 'Empty
  Chaine=Chaine & "<font color=red>Uninitialized</font>"
 Case 1 'Null 'If IsNull(Obj) Then
  If HideNull.Checked Then
   SP2=""
   exit function
  End If
  Chaine=Chaine & "<font color=red>No value</font>"
 Case 9 'Object
  Chaine=Chaine & "<font color=red>Can't display</font>"
 Case Else
  If RW="Read/Write" Then
   Chaine=Chaine & "<span ID=""" & name & """ contenteditable=true><b>" &_
     Replace(obj,"<","<") & "</b></span> <a href='#' onclick='vbscript:" &_
      ObjPath & "." & name & "="
   Select Case VarType(Obj)
   'Case 2 'vbInteger - CInt()
   'Case 3 'vbLong - CLng()
   'Case 4 'vbSingle - CSng()
   'Case 5 'double - CDbl()
   'Case 6 'vbCurrency - CCur()
   Case 7 'vbDate
    Chaine=Chaine & "CDate(" & name & ".innerText)"
   'Case 8 'vbString - CStr()
   'Case 10 'vbError
   Case 11 'vbBoolean
    Chaine=Chaine & "CBool(" & name & ".innerText)"
   'Case 12 'vbVariant
   'Case 13 'vbDataObject
   'Case 14 'vbDecimal
   'Case 17 'vbByte - CByte()
   'Case 8192 'vbArray 
   Case Else
    Chaine=Chaine & name & ".innerText"
   End Select
   Chaine=Chaine & "' title='Click here to update'>ok</a>"
  Else
   Chaine=Chaine & Replace(obj,"<","<")
  End If
 End Select
 Chaine=Chaine & "</TD></TR>"
 SP2=Chaine
End Function

Function SP(name,NbArg,ObjPath,Title) 'Methods
 Dim Chaine,x
 Chaine="<TR><TD>"
 Chaine=Chaine & "<a href=""#"" OnClick='vbscript:" & ObjPath & "." & name
 If NbArg>0 Then Chaine=Chaine & " " & Name & "1" & ".InnerText"
 If NbArg>1 Then Chaine=Chaine & "," & Name & "2" & ".InnerText"
 If NbArg>2 Then Chaine=Chaine & "," & Name & "3" & ".InnerText"
 Chaine=Chaine & " ' title='" & Title & "'>" & name & "</a>"
 Chaine=Chaine & "</TD><TD>"
 If NbArg>0 Then Chaine=Chaine & "<Input type=Text Name=" & Name & "1>"
 Chaine=Chaine & "</TD><TD>"
 If NbArg>1 Then Chaine=Chaine & "<Input type=Text Name=" & Name & "2>"
 Chaine=Chaine & "</TD><TD>"
 If NbArg>2 Then Chaine=Chaine & "<Input type=Text Name=" & Name & "3>"
 Chaine=Chaine & "</TD></TR>"
 SP=Chaine
End Function

Function ShowFrames(obj,Depth)
 Dim Chaine,x
on error resume next
 x=obj.frames.length
 Chaine =""
 If x<>0 Then
  'Chaine =x & vbCrLf
  For x=0 To obj.frames.length-1
   Chaine=Chaine & String(1+Depth*4," ")
   Chaine=Chaine & obj.frames(x).name
   Chaine=Chaine & obj.frames(x).Location & vbCrLF
   Chaine=Chaine & ShowFrames(obj.frames(x).document,Depth+1)
  Next
 End If
 ShowFrames=Chaine
End Function

Sub ShowProp(Obj,OP)
 'Display the object's properties
 Dim C,R,RW,x
 R="Read"
 RW="Read/Write"
 x=InstrRev(OP,".")
 If x>0 Then
  C=Left(OP,x-1)
  C="<a href=""#"" OnClick='vbscript:ShowProp " & C &  ",""" & C &_
   """' title='" & C & "'>" & C & "</a><u>" & Mid(OP,x) & "</u>"
 Else
  C=OP
 End If
 C="Properties for " & C & " - TypeName : " & typeName(obj) & "<br><TABLE class=Prop>"
 C=C & "<TR><TD>PropName</TD><TD>Type</TD><TD>Access</TD><TD>Value</TD></TR>"
 Select Case TypeName(obj) 'See Microsoft HTML Object Librairy
 Case "IShellDispatch3"
  C=C & SP2("Application",obj.Application,R,OP)
  C=C & SP2("Parent",obj.Parent,R,OP)
  C=C & SP2("Windows",obj.Windows,R,OP)
  C=C & SP("Open",1,OP,"Open a folder")
  C=C & SP("Explore",1,OP,"Explore a folder")
  C=C & SP("MinimizeAll",0,OP,"Minimize all windows")
  C=C & SP("UndoMinimizeAll",0,OP,"Undo Minimize all windows")
  C=C & SP("FileRun",0,OP,"Bring up the file run")
  C=C & SP("CascadeWindows",0,OP,"Cascade Windows")
  C=C & SP("TileVertically",0,OP,"Tile windows vertically")
  C=C & SP("TileHorizontally",0,OP,"Tile windows horizontally")
  C=C & SP("ShutdownWindows",0,OP,"Exit Windows")
  C=C & SP("Suspend",0,OP,"Suspend the pc")
  C=C & SP("EjectPC",0,OP,"Eject the pc")
  C=C & SP("SetTime",0,OP,"Bring up the Set time dialog")
  C=C & SP("Help",0,OP,"Display shell help")
  C=C & SP("FindFiles",0,OP,"Find Files")
  C=C & SP("FindComputer",0,OP,"Find a computer")
  

您可能想查找下面的文章:

  • DOM浏览器(方便需要dom操作的朋友)

相关文章

  • 网易手机图片自由下载器(hta)
  • HTML Component(HTC) 小应用
  • hta编写的消费记录程序
  • 锁定行头和列头的表格组件
  • hta实现涂鸦效果代码
  • 什么是hta(HTML Application)
  • 锁定行头和列头的表格组件
  • tweakomatic hta 下载
  • 用hta实现制作的无殇 - 快书V1.1打包下载了第1/2页
  • 鼠标放上去超链接的文字逐个加色效果

文章分类

  • vbs
  • DOS/BAT
  • hta/htc
  • python
  • perl
  • VBA
  • ColdFusion
  • ruby
  • PowerShell
  • Lua
  • Golang
  • linux shell

最近更新的内容

    • hta实现的二进制文件转换为文本
    • NCC Tools(never code counter tools) V1.0.1发布代码-代码统计工具
    • 用hta实现的桌面漂浮flash
    • 网易手机图片自由下载器(hta)
    • hta实现的笨狼XSLT练习器
    • 学习正则帮手笨狼正则练习器
    • 创建一个在标题栏中没有“关闭”按钮的 HTA
    • hta实现的定时关机小程序
    • HTC基础知识
    • 用htc实现验证模块

关于我们 - 联系我们 - 免责声明 - 网站地图

©2020-2025 All Rights Reserved. linkedu.com 版权所有