手机
当前位置:查字典教程网 >脚本专栏 >hta >DOM浏览器(方便需要dom操作的朋友)
DOM浏览器(方便需要dom操作的朋友)
摘要:Openafolderview,launchthisapplication,clickoninit,itdetectsallinstance...

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

复制代码 代码如下:

<html>

<head>

<title>Dom Explorer</title>

<HTA:APPLICATION

APPLICATIONNAME="Dom_Explorer"

BORDER="thick"BORDERSTYLE="normal"

CAPTION="yes" CONTEXTMENU="yes"

ID="oHTA" alert(oHTA.applicationName);

INNERBORDER="yes" MAXIMIZEBUTTON="yes" MINIMIZEBUTTON="yes"

NAVIGABLE="no" SCROLL="yes" SCROLLFLAT="no"

SELECTION="yes"SHOWINTASKBAR="yes" SINGLEINSTANCE="no"

SYSMENU="yes" VERSION="0.5" WINDOWSTATE="normal">

<script language=vbscript>

option explicit

dim shApp

set shApp=createobject("shell.application")

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")

C=C & SP("RefreshMenu",0,OP,"Refresh the menu")

C=C & SP("ControlPanelItem",1,OP,"Run a Control Panel Item")

'isRestricted, GetSystemInformation, isServiceRunning, CanStartStopService

C=C & SP("ShellExecute",3,OP,"Execute generic command (file[,args][,dir])")

C=C & SP("FindPrinter",3,OP,"Find a Printer in the Directory Service ([name][,location][,model])")

C=C & SP("ServiceStart",2,OP,"Start a service by name, and optionally set it to autostart (name,persistent)")

C=C & SP("ServiceStop",2,OP,"Stop a service by name, and optionally disable autostart (name,persistent)")

C=C & SP("ShowBrowserBar",2,OP,"Show/Hide browser bar (clsid,bShow)")

C=C & SP("AddToRecent",2,OP,"Add an object to the Recent Docuements(File[,category]")

Case "IShellWindows"

C=C & SP2("Count",obj.Count,R,OP)

'C=C & SP2("Item",obj.Item,R,OP)

'For Each w In shApp.Windows

'Next

For x=0 To obj.Count-1

C=C & SP2("Item(" & x & ")",obj.Item(x),R,OP)

Next

Case "IWebBrowser2"'Internet Explorer

Msgbox ShowFrames(obj.document,0)

on error resume next

C=C & SP2("AddressBar",obj.AddressBar,RW,OP)

on error goto 0

C=C & SP2("Application",obj.Application,R,OP)'Microsoft Internet Explorer

C=C & SP2("Busy",obj.Busy,R,OP)

C=C & SP2("Container",obj.Container,R,OP)

C=C & SP2("Document",obj.document,R,OP)

C=C & SP2("FullName",obj.FullName,R,OP)

C=C & SP2("FullScreen",obj.FullScreen,RW,OP)

C=C & SP2("Height",obj.Height,RW,OP)

C=C & SP2("HWND",obj.Hwnd,R,OP)

C=C & SP2("Left",obj.Left,RW,OP)

C=C & SP2("LocationName",obj.LocationName,R,OP)

C=C & SP2("LocationURL",obj.LocationURL,R,OP)

C=C & SP2("MenuBar",obj.MenuBar,RW,OP)

C=C & SP2("Name",obj.Name,R,OP)'Microsoft Internet Explorer

C=C & SP2("OffLine",obj.OffLine,RW,OP)

C=C & SP2("Parent",obj.Parent,R,OP)

C=C & SP2("Path",obj.Path,R,OP)

C=C & SP2("ReadyState",obj.ReadyState,R,OP)

'READYSTATE_UNINITIALIZED=0

'READYSTATE_LOADING=1

'READYSTATE_LOADED=2

'READYSTATE_INTERACTIVE=3

'READYSTATE_COMPLETE=4

C=C & SP2("RegisterAsBrowser",obj.RegisterAsBrowser,RW,OP)

C=C & SP2("RegisterAsDropTarget",obj.RegisterAsDropTarget,RW,OP)

C=C & SP2("Resizable",obj.Resizable,RW,OP)

C=C & SP2("Silent",obj.Silent,RW,OP)

C=C & SP2("StatusBar",obj.StatusBar,RW,OP)

C=C & SP2("StatusText",obj.StatusText,RW,OP)

C=C & SP2("TheaterMode",obj.TheaterMode,RW,OP)

C=C & SP2("Toolbar",obj.Toolbar,RW,OP)

C=C & SP2("Top",obj.Top,RW,OP)

C=C & SP2("TopLevelContainer",obj.TopLevelContainer,R,OP)

On Error Resume Next

C=C & SP2("Type",obj.Type,R,OP)'Document HTML

On Error Goto 0

C=C & SP2("Visible",obj.Visible,RW,OP)

C=C & SP2("Width",obj.Width,RW,OP)

C=C & SP("GoBack",0,OP,"Navigates to the previous item in the history list")

C=C & SP("GoForward",0,OP,"Navigates to the next item in the history list")

C=C & SP("GoHome",0,OP,"Go home/start page")

C=C & SP("GoSearch",0,OP,"Go Search Page")

C=C & SP("Navigate",3,OP,"Navigates to a URL or file(url[,Flags][,TargetFrameName])")

C=C & SP("Refresh",0,OP,"Refresh the currently viewed page")

C=C & SP("Refresh2",1,OP,"Refresh the currently viewed page([level])")

C=C & SP("Stop",0,OP,"Stops opening a file")

C=C & SP("Quit",0,OP,"Exits application and closes the open document")

'ClientToWindow, GetProperty, QueryStatusWB, ExecWB

C=C & SP("PutProperty",0,OP,"Associates Value with the name Property in the context of the object(property,value)")

C=C & SP("Navigate2",3,OP,"Navigates to a URL or file or pidl (url[,Flags][,TargetFrameName])")

C=C & SP("ShowBrowserBar",3,OP,"Set BrowserBar to Clsid (clsid[,show][,size])")

Case "IShellFolderViewDual"'Explorer

C=C & SP2("Application",obj.Application,R,OP)

C=C & SP2("Folder",obj.Folder,R,OP)

on error resume next

C=C & SP2("Parent",obj.Parent,R,OP)

on error goto 0

C=C & SP2("SelectedItems",obj.SelectedItems,R,OP)

C=C & SP2("FocusedItem",obj.FocusedItem,R,OP)

C=C & SP2("Script",obj.Script,R,OP)

C=C & SP2("ViewOptions",obj.ViewOptions,R,OP)

C=C & SP("SelectItem",2,OP,"Select the item (pvfi,Flags)")

'PopupItemMenu

Case "IShellFolderViewDual2"'Explorer en ftp

C=C & SP2("Application",obj.Application,R,OP)

C=C & SP2("Folder",obj.Folder,R,OP)

on error resume next

C=C & SP2("Parent",obj.Parent,R,OP)

C=C & SP2("SelectedItems",obj.SelectedItems,R,OP)

C=C & SP2("FocusedItem",obj.FocusedItem,R,OP)

C=C & SP2("Script",obj.Script,R,OP)

C=C & SP2("ViewOptions",obj.ViewOptions,R,OP)

C=C & SP2("CurrentViewMode",obj.CurrentViewMode,RW,OP)

on error goto 0

C=C & SP("SelectItem",2,OP,"Select the item (pvfi,Flags)")

C=C & SP("SelectItemRelative",1,OP,"Select Item relative to the Current Item (iRelative)")

'PopupItemMenu

Case "Folder3"

C=C & SP2("Application",obj.Application,R,OP)

C=C & SP2("HaveToShowWebViewBarricade",obj.HaveToShowWebViewBarricade,R,OP)

C=C & SP2("Items",obj.Items,R,OP)

on error resume next

C=C & SP2("Parent",obj.Parent,R,OP)

on error goto 0

C=C & SP2("OfflineStatus",obj.OfflineStatus,R,OP)

C=C & SP2("ParentFolder",obj.ParentFolder,R,OP)

C=C & SP2("Self",obj.Self,R,OP)

C=C & SP2("ShowWebViewBarricade",obj.ShowWebViewBarricade,RW,OP)

C=C & SP2("Title",obj.Title,R,OP)

'ParseName, GetDetailsOf

C=C & SP("NewFolder",2,OP,"Create a new sub folder in this folder (name[,options])")

C=C & SP("MoveHere",2,OP,"Move Items to this folder (item[,options])")

C=C & SP("CopyHere",2,OP,"Copy Items to this folder (item[,options])")

C=C & SP("Synchronize",0,OP,"Synchronize all offline files")

C=C & SP("DismissedWebViewBarricade",0,OP,"Call this after the WebView barricade is dismissed by the user")

Case "FolderItem2"

C=C & SP2("Application",obj.Application,R,OP)

If obj.IsLink Then C=C & SP2("GetLink",obj.GetLink,R,OP)

If obj.IsFolder Then C=C & SP2("GetFolder",obj.GetFolder,R,OP)

C=C & SP2("IsBrowsable",obj.IsBrowsable,R,OP)

C=C & SP2("IsFileSystem",obj.IsFileSystem,R,OP)

C=C & SP2("IsFolder",obj.IsFolder,R,OP)

C=C & SP2("IsLink",obj.IsLink,R,OP)

C=C & SP2("ModifyDate",obj.ModifyDate,RW,OP)

C=C & SP2("Name",obj.Name,RW,OP)

C=C & SP2("Parent",obj.Parent,R,OP)

C=C & SP2("Path",obj.Path,R,OP)

C=C & SP2("Size",obj.Size,R,OP)

C=C & SP2("Type",obj.Type,R,OP)

C=C & SP2("Verbs",obj.Verbs,R,OP)

C=C & SP("InvokeVerb",1,OP,"Execute a command on the item ([verb])")

C=C & SP("InvokeVerbEx",2,OP,"Extended version of InvokeVerb ([verb][,args])")

'ExtendedProperty

Case "FolderItemVerbs"

on error resume next

C=C & SP2("Application",obj.Application,R,OP)

C=C & SP2("Parent",obj.Parent,R,OP)

on error goto 0

C=C & SP2("Count",obj.Count,R,OP)

For x=0 To obj.Count-1

C=C & SP2("Item(" & x & ")",obj.Item(x),R,OP)

Next

Case "FolderItemVerb"

on error resume next

C=C & SP2("Application",obj.Application,R,OP)

C=C & SP2("Parent",obj.Parent,R,OP)

on error goto 0

C=C & SP2("Name",obj.Name,R,OP)

C=C & SP("DoIt",0,OP,"Execute the verb")

Case "FolderItems3"

on error resume next

C=C & SP2("Application",obj.Application,R,OP)

C=C & SP2("Parent",obj.Parent,R,OP)

on error goto 0

C=C & SP2("Count",obj.Count,R,OP)

For x=0 To obj.Count-1

C=C & SP2("Item(" & x & ")",obj.Item(x),R,OP)

Next

C=C & SP2("Verbs",obj.Verbs,R,OP)

C=C & SP("InvokeVerbEx",2,OP,"Extended version of InvokeVerb for a collection of Folder Items([verb][,args])")

C=C & SP("Filter",2,OP,"Set a wildcard filter to apply to the items returned ([Flags][,FileSpec])")

Case "HTMLWindow2"'Script IHTMLWindow2

C=C & SP2("clientInformation",obj.clientInformation,R,OP)

C=C & SP2("clipboardData",obj.clipboardData,R,OP)

C=C & SP2("closed",obj.closed,R,OP)

C=C & SP2("defaultStatus",obj.defaultStatus,RW,OP)

C=C & SP2("document",obj.document,R,OP)

C=C & SP2("event",obj.event,R,OP)

C=C & SP2("external",obj.external,R,OP)

C=C & SP2("frames",obj.frames,R,OP)

C=C & SP2("history",obj.history,R,OP)

C=C & SP2("image",obj.image,R,OP)

'C=C & SP2("item",obj.item,R,OP)

For x=0 To obj.length-1

C=C & SP2("Item(" & x & ")",obj.Item(x),R,OP)

Next

C=C & SP2("length",obj.length,R,OP)

C=C & SP2("location",obj.location,R,OP)

C=C & SP2("name",obj.name,RW,OP)

C=C & SP2("navigator",obj.navigator,R,OP)

C=C & SP2("offscreenBuffering",obj.offscreenBuffering,RW,OP)

C=C & SP2("onafterprint",obj.onafterprint,RW,OP)

C=C & SP2("onbeforeprint",obj.onbeforeprint,RW,OP)

C=C & SP2("onbeforeunload",obj.onbeforeunload,RW,OP)

C=C & SP2("onblur",obj.onblur,RW,OP)

C=C & SP2("onerror",obj.onerror,RW,OP)

C=C & SP2("onfocus",obj.onfocus,RW,OP)

C=C & SP2("onhelp",obj.onhelp,RW,OP)

C=C & SP2("onload",obj.onload,RW,OP)

C=C & SP2("onresize",obj.onresize,RW,OP)

C=C & SP2("onscroll",obj.onscroll,RW,OP)

C=C & SP2("onunload",obj.onunload,RW,OP)

C=C & SP2("opener",obj.opener,RW,OP)

C=C & SP2("option",obj.option,R,OP)

C=C & SP2("parent",obj.parent,R,OP)

C=C & SP2("screen",obj.screen,R,OP)

C=C & SP2("screenLeft",obj.screenLeft,R,OP)

C=C & SP2("screenTop",obj.screenTop,R,OP)

C=C & SP2("self",obj.self,R,OP)

C=C & SP2("status",obj.status,RW,OP)

C=C & SP2("top",obj.top,R,OP)

C=C & SP2("toString",obj.toString,R,OP)

C=C & SP2("window",obj.window,R,OP)

'setTimeout, confirm, prompt, open, setInterval

C=C & SP("Alert",1,OP,"(message)")

C=C & SP("blur",0,OP,"")

C=C & SP("ClearInterval",1,OP,"(timerID)")

C=C & SP("ClearTimeout",1,OP,"(timerID)")

C=C & SP("Close",0,OP,"")

C=C & SP("execScript",2,OP,"(code[,language])")

C=C & SP("focus",0,OP,"")

C=C & SP("moveBy",2,OP,"(x,y)")

C=C & SP("moveTo",2,OP,"(x,y)")

C=C & SP("Navigate",1,OP,"(url)")

C=C & SP("resizeBy",2,OP,"(x,y)")

C=C & SP("resizeTo",2,OP,"(x,y)")

C=C & SP("scroll",2,OP,"(x,y)")

C=C & SP("scrollBy",2,OP,"(x,y)")

C=C & SP("scrollTo",2,OP,"(x,y)")

C=C & SP("showHelp",3,OP,"(url,arg,features)")

C=C & SP("showModalDialog",3,OP,"(dialog,argin,options)")

Case "HTMLDocument"'DispHTMLDocument ou iHTMLDocument#

C=C & SP2("ActiveElement",obj.ActiveElement,R,OP)

C=C & SP2("alinkColor",obj.alinkColor,RW,OP)

C=C & SP2("All",obj.All,R,OP)

C=C & SP2("Anchors",obj.Anchors,R,OP)

C=C & SP2("Applets",obj.Applets,R,OP)

on error resume next

C=C & SP2("baseUrl",obj.baseUrl,RW,OP)

on error goto 0

C=C & SP2("bgColor",obj.bgColor,RW,OP)

C=C & SP2("Body",obj.Body,R,OP)

C=C & SP2("charset",obj.charset,RW,OP)

C=C & SP2("childNodes",obj.childNodes,RW,OP)

C=C & SP2("cookie",obj.cookie,RW,OP)

C=C & SP2("defaultCharset",obj.defaultCharset,RW,OP)

C=C & SP2("DesignMode",obj.DesignMode,RW,OP)

C=C & SP2("dir",obj.dir,RW,OP)

C=C & SP2("documentElement",obj.documentElement,R,OP)

C=C & SP2("domain",obj.domain,RW,OP)

on error resume next

C=C & SP2("enableDownload",obj.enableDownload,RW,OP)

on error goto 0

C=C & SP2("embeds",obj.embeds,R,OP)

C=C & SP2("expando",obj.expando,RW,OP)

C=C & SP2("fgColor",obj.fgColor,RW,OP)

on error resume next

C=C & SP2("fileSize",obj.fileSize,R,OP)

C=C & SP2("fileCreatedDate",obj.fileCreatedDate,R,OP)

C=C & SP2("fileModifiedDate",obj.fileModifiedDate,R,OP)

on error goto 0

C=C & SP2("fileUpdatedDate",obj.fileUpdatedDate,R,OP)

C=C & SP2("Forms",obj.Forms,R,OP)

C=C & SP2("frames",obj.frames,R,OP)

on error resume next

For x=0 To obj.Frames.Length-1

'If obj.Frames(x).Name<>"" Then

'C=C & SP2("frames(" & obj.Frames(x).Name & ")",obj.frames(x),R,OP)

'Else

C=C & SP2("frames(" & x & ")",obj.frames(x),R,OP)

'End If

Next

on error goto 0

C=C & SP2("hasFocus",obj.hasFocus,R,OP)

C=C & SP2("Images",obj.Images,R,OP)

on error resume next

C=C & SP2("inheritStyleSheets",obj.inheritStyleSheets,RW,OP)

on error goto 0

C=C & SP2("lastModified",obj.lastModified,R,OP)

C=C & SP2("linkColor",obj.linkColor,RW,OP)

C=C & SP2("Links",obj.Links,R,OP)

C=C & SP2("location",obj.location,R,OP)

C=C & SP2("media",obj.media,RW,OP)

on error resume next

C=C & SP2("mimeType",obj.mimeType,R,OP)

on error goto 0

C=C & SP2("nameProp",obj.nameProp,R,OP)

on error resume next

C=C & SP2("namespaces",obj.namespaces,R,OP)

on error goto 0

C=C & SP2("onafterupdate",obj.onafterupdate,RW,OP)

C=C & SP2("onbeforeeditfocus",obj.onbeforeeditfocus,RW,OP)

C=C & SP2("onbeforeupdate",obj.onbeforeupdate,RW,OP)

C=C & SP2("oncellchange",obj.oncellchange,RW,OP)

C=C & SP2("onclick",obj.onclick,RW,OP)

C=C & SP2("oncontextmenu",obj.oncontextmenu,RW,OP)

C=C & SP2("oncontrolselect",obj.oncontrolselect,RW,OP)

C=C & SP2("ondataavailable",obj.ondataavailable,RW,OP)

C=C & SP2("ondatasetchanged",obj.ondatasetchanged,RW,OP)

C=C & SP2("ondatasetcomplete",obj.ondatasetcomplete,RW,OP)

C=C & SP2("ondblclick",obj.ondblclick,RW,OP)

C=C & SP2("ondragstart",obj.ondragstart,RW,OP)

C=C & SP2("onerrorupdate",obj.onerrorupdate,RW,OP)

C=C & SP2("onhelp",obj.onhelp,RW,OP)

C=C & SP2("onkeydown",obj.onkeydown,RW,OP)

C=C & SP2("onkeypress",obj.onkeypress,RW,OP)

C=C & SP2("onkeyup",obj.onkeyup,RW,OP)

C=C & SP2("onmousedown",obj.onmousedown,RW,OP)

C=C & SP2("onmousemove",obj.onmousemove,RW,OP)

C=C & SP2("onmouseout",obj.onmouseout,RW,OP)

C=C & SP2("onmouseover",obj.onmouseover,RW,OP)

C=C & SP2("onmouseup",obj.onmouseup,RW,OP)

C=C & SP2("onpropertychange",obj.onpropertychange,RW,OP)

C=C & SP2("onreadystatechange",obj.onreadystatechange,RW,OP)

C=C & SP2("onrowenter",obj.onrowenter,RW,OP)

C=C & SP2("onrowexit",obj.onrowexit,RW,OP)

C=C & SP2("onrowsdelete",obj.onrowsdelete,RW,OP)

C=C & SP2("onrowsinserted",obj.onrowsinserted,RW,OP)

C=C & SP2("onselectionchange",obj.onselectionchange,RW,OP)

C=C & SP2("onselectstart",obj.onselectstart,RW,OP)

C=C & SP2("onstop",obj.onstop,RW,OP)

on error resume next

C=C & SP2("parentDocument",obj.parentDocument,R,OP)

on error goto 0

C=C & SP2("parentWindow",obj.parentWindow,R,OP)

C=C & SP2("plugins",obj.plugins,R,OP)

C=C & SP2("protocol",obj.protocol,R,OP)

C=C & SP2("readyState",obj.readyState,R,OP)

C=C & SP2("referrer",obj.referrer,R,OP)

C=C & SP2("security",obj.security,R,OP)

C=C & SP2("Selection",obj.Selection,R,OP)

C=C & SP2("Script",obj.Script,R,OP)

C=C & SP2("Scripts",obj.Scripts,R,OP)

C=C & SP2("styleSheets",obj.styleSheets,R,OP)

C=C & SP2("Title",obj.Title,RW,OP)

C=C & SP2("toString",obj.toString,R,OP)

C=C & SP2("uniqueID",obj.uniqueID,R,OP)

C=C & SP2("url",obj.url,RW,OP)

C=C & SP2("URLUnencoded",obj.URLUnencoded,RW,OP)

C=C & SP2("vlinkColor",obj.vlinkColor,RW,OP)

'createDocumentFromUrl, CreateEventObject, FireEvent, createRenderStyle

'createTextNode, attachEvent, detachEvent, createDocumentFragment

'getElementsByName, getElementById, getElementsByTagName, open

'queryCommandSupported, queryCommandEnabled, queryCommandState

'queryCommandIndeterm, queryCommandText, queryCommandValue, execCommand

'execCommandShowHelp, createElement, elementFromPoint, createStyleSheet

C=C & SP("clear",0,OP,"")

C=C & SP("close",0,OP,"")

C=C & SP("focus",0,OP,"")

C=C & SP("releaseCapture",0,OP,"")

C=C & SP("recalc",1,OP,"(bForce)")

C=C & SP("write",1,OP,"(psarray)")

C=C & SP("writeln",1,OP,"(psarray)")

Case "IHTMLScreen"'script.screen

C=C & SP2("availHeight",obj.availHeight,R,OP)

C=C & SP2("availWidth",obj.availWidth,R,OP)

C=C & SP2("bufferDepth",obj.bufferDepth,RW,OP)

C=C & SP2("colorDepth",obj.colorDepth,R,OP)

C=C & SP2("fontSmoothingEnabled",obj.fontSmoothingEnabled,R,OP)

C=C & SP2("height",obj.height,R,OP)

C=C & SP2("updateInterval",obj.updateInterval,RW,OP)

C=C & SP2("Width",obj.Width,R,OP)

Case "IHTMLLocation"'script.location

C=C & SP2("hash",obj.hash,RW,OP)

C=C & SP2("host",obj.host,RW,OP)

C=C & SP2("hostname",obj.hostname,RW,OP)

C=C & SP2("href",obj.href,RW,OP)

C=C & SP2("pathname",obj.pathname,RW,OP)

C=C & SP2("port",obj.port,RW,OP)

C=C & SP2("protocol",obj.protocol,RW,OP)

C=C & SP2("search",obj.search,RW,OP)

C=C & SP2("toString",obj.toString,R,OP)

C=C & SP("reload",1,OP,"([flag])")

C=C & SP("replace",1,OP,"(str)")

C=C & SP("asign",1,OP,"(str)")

Case "IHTMLImageElementFactory","IHTMLOptionElementFactory"'script.image

'1 method create, no property

Case "IHTMLDataTransfer"'Clipboard

C=C & SP2("dropEffect",obj.dropEffect,RW,OP)

C=C & SP2("effectAllowed",obj.effectAllowed,RW,OP)

'setData, getData,clearData

Case "HTMLNavigator"'IOmNavigator : script.navigator

C=C & SP2("appCodeName",obj.appCodeName,R,OP)

C=C & SP2("appName",obj.appName,R,OP)

C=C & SP2("appMinorVersion",obj.appMinorVersion,R,OP)

C=C & SP2("appVersion",obj.appVersion,R,OP)

C=C & SP2("browserLanguage",obj.browserLanguage,R,OP)

on error resume next

C=C & SP2("connectionSpeed",obj.connectionSpeed,R,OP)

on error goto 0

C=C & SP2("cookieEnabled",obj.cookieEnabled,R,OP)

C=C & SP2("cpuClass",obj.cpuClass,R,OP)

C=C & SP2("javaEnabled",obj.javaEnabled,R,OP)

C=C & SP2("mimeTypes",obj.mimeTypes,R,OP)

C=C & SP2("onLine",obj.onLine,R,OP)

C=C & SP2("opsProfile",obj.opsProfile,R,OP)

C=C & SP2("platform",obj.platform,R,OP)

C=C & SP2("plugins",obj.plugins,R,OP)

C=C & SP2("systemLanguage",obj.systemLanguage,R,OP)

C=C & SP2("taintEnabled",obj.taintEnabled,R,OP)

C=C & SP2("toString",obj.toString,R,OP)

C=C & SP2("userAgent",obj.userAgent,R,OP)

C=C & SP2("userLanguage",obj.userLanguage,R,OP)

C=C & SP2("userProfile",obj.userProfile,R,OP)

Case "IOmHistory"

C=C & SP2("length",obj.length,R,OP)

C=C & SP("back",1,OP,"([distance])")

C=C & SP("go",1,OP,"([distance])")

C=C & SP("forward",1,OP,"([distance])")

Case "CMimeTypes"'script.navigator.mimeTypes IHTMLMimeTypesCollection

C=C & SP2("length",obj.length,R,OP)

Case "CPlugins"'script.navigator.pluginsIHTMLPluginsCollection

C=C & SP2("length",obj.length,R,OP)

C=C & SP("refresh",1,OP,"([reload])")

Case "COpsProfile"'script.navigator.opsProfile IHTMLOpsProfile

'addRequest, getAttribute, setAttribute, commitChanges

'addReadRequest, doReadRequest,doWriteRequest

C=C & SP("clearRequest",0,OP,"")

C=C & SP("doRequest",3,OP,"(usage[,fname][,domain])")

Case "DispHTMLElementCollection"'All, applets, forms...

For x=0 To obj.length-1

C=C & SP2("Item(" & x & ")",obj.Item(x),R,OP)

Next

C=C & SP2("length",obj.length,RW,OP)

C=C & SP2("toString",obj.toString,R,OP)

C=C & SP2("tags",obj.tags(),R,OP)

C=C & SP2("urns",obj.urns(),R,OP)

Case "HTMLFrameSetSite", "HTMLTitleElement", "HTMLFrameElement", "HTMLHtmlElement",_

"HTMLHeadElement", "HTMLScriptElement", "HTMLCommentElement"

'Disp/IHTMLxxx

on error resume next

C=C & SP2("accessKey",obj.accessKey,RW,OP)

C=C & SP2("all",obj.all,R,OP)

C=C & SP2("allowTransparency",obj.allowTransparency,RW,OP)

C=C & SP2("atomic",obj.atomic,RW,OP)

C=C & SP2("attributes",obj.attributes,R,OP)

C=C & SP2("behaviorUrns",obj.behaviorUrns,R,OP)

C=C & SP2("border",obj.border,RW,OP)

C=C & SP2("borderColor",obj.borderColor,RW,OP)

C=C & SP2("canHaveChildren",obj.canHaveChildren,R,OP)

C=C & SP2("canHaveHTML",obj.canHaveHTML,R,OP)

C=C & SP2("childNodes",obj.childNodes,R,OP)

C=C & SP2("children",obj.children,R,OP)

C=C & SP2("className",obj.className,RW,OP)

C=C & SP2("clientHeight",obj.clientHeight,R,OP)

C=C & SP2("clientLeft",obj.clientLeft,R,OP)

C=C & SP2("clientTop",obj.clientTop,R,OP)

C=C & SP2("clientWidth",obj.clientWidth,R,OP)

C=C & SP2("cols",obj.cols,RW,OP)

C=C & SP2("contentEditable",obj.contentEditable,RW,OP)

C=C & SP2("contentWindow",obj.contentWindow,R,OP)'Frame

C=C & SP2("createControlRange",obj.createControlRange,R,OP)

C=C & SP2("currentStyle",obj.currentStyle,R,OP)

C=C & SP2("dataFld",obj.dataFld,RW,OP)'HTMLFrameElement

C=C & SP2("dataFormatAs",obj.dataFormatAs,RW,OP)

C=C & SP2("dataSrc",obj.dataSrc,RW,OP)

C=C & SP2("defer",obj.defer,RW,OP)

C=C & SP2("disabled",obj.disabled,RW,OP)

C=C & SP2("dir",obj.dir,RW,OP)

C=C & SP2("document",obj.document,R,OP)

C=C & SP2("dragdrop",obj.dragdrop,R,OP)

C=C & SP2("event",obj.event,RW,OP)'script

C=C & SP2("filters",obj.filters,R,OP)

C=C & SP2("firstChild",obj.firstChild,R,OP)

C=C & SP2("frameBorder",obj.frameBorder,RW,OP)

C=C & SP2("frameSpacing",obj.frameSpacing,RW,OP)

C=C & SP2("getBoundingClientRect",obj.getBoundingClientRect,R,OP)

C=C & SP2("getClientRects",obj.getClientRects,R,OP)

'C=C & SP2("glyphMode",obj.glyphMode,R,OP)'restricted

C=C & SP2("hasChildNodes",obj.hasChildNodes,R,OP)

C=C & SP2("height",obj.height,RW,OP)

C=C & SP2("hideFocus",obj.hideFocus,RW,OP)

C=C & SP2("htmlFor",obj.htmlFor,RW,OP)'script

C=C & SP2("id",obj.id,RW,OP)

C=C & SP2("iscontentEditable",obj.iscontentEditable,R,OP)

C=C & SP2("isdisabled",obj.isdisabled,R,OP)

C=C & SP2("isMultiLine",obj.isMultiLine,R,OP)

C=C & SP2("isTextEdit",obj.istextEdit,R,OP)

C=C & SP2("innerHtml",obj.innerHtml,RW,OP)

C=C & SP2("innerText",obj.innerText,RW,OP)

C=C & SP2("lang",obj.lang,RW,OP)

C=C & SP2("language",obj.language,RW,OP)

C=C & SP2("lastChild",obj.lastChild,R,OP)

C=C & SP2("marginHeight",obj.marginHeight,RW,OP)

C=C & SP2("marginWidth",obj.marginWidth,RW,OP)

C=C & SP2("name",obj.name,RW,OP)

C=C & SP2("nextSibling",obj.nextSibling,R,OP)

C=C & SP2("nodeName",obj.nodeName,R,OP)

C=C & SP2("nodeValue",obj.nodeValue,RW,OP)

C=C & SP2("nodeType",obj.nodeType,R,OP)

C=C & SP2("noResize",obj.noResize,RW,OP)

C=C & SP2("offsetHeight",obj.offsetHeight,R,OP)

C=C & SP2("offsetLeft",obj.offsetLeft,R,OP)

C=C & SP2("offsetParent",obj.offsetParent,R,OP)

C=C & SP2("offsetTop",obj.offsetTop,R,OP)

C=C & SP2("offsetWidth",obj.offsetWidth,R,OP)

C=C & SP2("onactivate",obj.onactivate,RW,OP)

C=C & SP2("onafterprint",obj.onafterprint,RW,OP)

C=C & SP2("onafterupdate",obj.onafterupdate,RW,OP)

C=C & SP2("onbeforecopy",obj.onbeforecopy,RW,OP)

C=C & SP2("onbeforecut",obj.onbeforecut,RW,OP)

C=C & SP2("onbeforedeactivate",obj.onbeforedeactivate,RW,OP)

C=C & SP2("onbeforeeditfocus",obj.onbeforeeditfocus,RW,OP)

C=C & SP2("onbeforepaste",obj.onbeforepaste,RW,OP)

C=C & SP2("onbeforeprint",obj.onbeforeprint,RW,OP)

C=C & SP2("onbeforeunload",obj.onbeforeunload,RW,OP)

C=C & SP2("onbeforeupdate",obj.onbeforeupdate,RW,OP)

C=C & SP2("onblur",obj.onblur,RW,OP)

C=C & SP2("oncellchange",obj.oncellchange,RW,OP)

C=C & SP2("onclick",obj.onclick,RW,OP)

C=C & SP2("oncontextmenu",obj.oncontextmenu,RW,OP)

C=C & SP2("oncontrolselect",obj.oncontrolselect,RW,OP)

C=C & SP2("oncopy",obj.oncopy,RW,OP)

C=C & SP2("oncut",obj.oncut,RW,OP)

C=C & SP2("ondataavailable",obj.ondataavailable,RW,OP)

C=C & SP2("ondatasetchanged",obj.ondatasetchanged,RW,OP)

C=C & SP2("ondatasetcomplete",obj.ondatasetcomplete,RW,OP)

C=C & SP2("ondblclick",obj.ondblclick,RW,OP)

C=C & SP2("ondeactivate",obj.ondeactivate,RW,OP)

C=C & SP2("ondrag",obj.ondrag,RW,OP)

C=C & SP2("ondragend",obj.ondragend,RW,OP)

C=C & SP2("ondragenter",obj.ondragenter,RW,OP)

C=C & SP2("ondragleave",obj.ondragleave,RW,OP)

C=C & SP2("ondragover",obj.ondragover,RW,OP)

C=C & SP2("ondragstart",obj.ondragstart,RW,OP)

C=C & SP2("ondrop",obj.ondrop,RW,OP)

C=C & SP2("onerror",obj.onerror,RW,OP)'script

C=C & SP2("onerrorupdate",obj.onerrorupdate,RW,OP)

C=C & SP2("onfilterchange",obj.onfilterchange,RW,OP)

C=C & SP2("onfocus",obj.onfocus,RW,OP)

C=C & SP2("onhelp",obj.onhelp,RW,OP)

C=C & SP2("onkeydown",obj.onkeydown,RW,OP)

C=C & SP2("onkeypress",obj.onkeypress,RW,OP)

C=C & SP2("onkeyup",obj.onkeyup,RW,OP)

C=C & SP2("onlayoutcomplete",obj.onlayoutcomplete,RW,OP)

C=C & SP2("onlosecapture",obj.onlosecapture,RW,OP)

C=C & SP2("onload",obj.onload,RW,OP)

C=C & SP2("onmove",obj.onmove,RW,OP)

C=C & SP2("onmoveend",obj.onmoveend,RW,OP)

C=C & SP2("onmovestart",obj.onmovestart,RW,OP)

C=C & SP2("onmousedown",obj.onmousedown,RW,OP)

C=C & SP2("onmouseenter",obj.onmouseenter,RW,OP)

C=C & SP2("onmouseleave",obj.onmouseleave,RW,OP)

C=C & SP2("onmousemove",obj.onmousemove,RW,OP)

C=C & SP2("onmouseout",obj.onmouseout,RW,OP)

C=C & SP2("onmouseover",obj.onmouseover,RW,OP)

C=C & SP2("onmouseup",obj.onmouseup,RW,OP)

C=C & SP2("onpage",obj.onpage,RW,OP)

C=C & SP2("onpaste",obj.onpaste,RW,OP)

C=C & SP2("onpropertychange",obj.onpropertychange,RW,OP)

C=C & SP2("onreadystatechange",obj.onreadystatechange,RW,OP)

C=C & SP2("onresize",obj.onresize,RW,OP)

C=C & SP2("onresizeend",obj.onresizeend,RW,OP)

C=C & SP2("onresizestart",obj.onresizestart,RW,OP)

C=C & SP2("onrowenter",obj.onrowenter,RW,OP)

C=C & SP2("onrowexit",obj.onrowexit,RW,OP)

C=C & SP2("onrowsdelete",obj.onrowsdelete,RW,OP)

C=C & SP2("onrowsinserted",obj.onrowsinserted,RW,OP)

C=C & SP2("onscroll",obj.onscroll,RW,OP)

C=C & SP2("onselectstart",obj.onselectstart,RW,OP)

C=C & SP2("outerHtml",obj.outerHtml,RW,OP)

C=C & SP2("outerText",obj.outerText,RW,OP)

C=C & SP2("onunload",obj.onunload,RW,OP)

C=C & SP2("parentElement",obj.parentElement,R,OP)

C=C & SP2("parentNode",obj.parentNode,R,OP)

C=C & SP2("parentTextEdit",obj.parentTextEdit,R,OP)

C=C & SP2("previousSibling",obj.previousSibling,R,OP)

C=C & SP2("recordNumber",obj.recordNumber,R,OP)

C=C & SP2("readyState",obj.readyState,R,OP)

C=C & SP2("rows",obj.rows,RW,OP)

C=C & SP2("runtimeStyle",obj.runtimeStyle,R,OP)

C=C & SP2("scopeName",obj.scopeName,R,OP)

C=C & SP2("scrollHeight",obj.scrollHeight,R,OP)

C=C & SP2("scrolling",obj.scrolling,RW,OP)'Frame

C=C & SP2("scrollLeft",obj.scrollLeft,R,OP)

C=C & SP2("scrollTop",obj.scrollTop,R,OP)

C=C & SP2("scrollWidth",obj.scrollWidth,R,OP)

C=C & SP2("sourceIndex",obj.sourceIndex,R,OP)

C=C & SP2("src",obj.src,RW,OP)

C=C & SP2("style",obj.style,R,OP)

C=C & SP2("tagName",obj.tagName,R,OP)

C=C & SP2("tagUrn",obj.tagUrn,RW,OP)

C=C & SP2("tabIndex",obj.tabIndex,RW,OP)

C=C & SP2("text",obj.text,RW,OP)'title, script

C=C & SP2("title",obj.title,RW,OP)

C=C & SP2("type",obj.type,RW,OP)

C=C & SP2("toString",obj.toString,R,OP)

C=C & SP2("uniqueID",obj.uniqueID,R,OP)

C=C & SP2("uniqueNumber",obj.uniqueNumber,R,OP)

C=C & SP2("width",obj.width,RW,OP)

'getAttribute, removeAttribute, contains, componentFromPoint, getExpression

'removeExpression, addFilter, removeFilter,attachEvent,detachEvent

'insertAdjacentElement, applyElement, getAdjacentText, replaceAdjacentText

'addBehavior, removeBehavior, getElementsByTagName, mergeAttributes

'FireEvent, insertBefore, removeChild, replaceChild, cloneNode, removeNode

'swapNode, replaceNode, appendChild

C=C & SP("blur",0,OP,"")

C=C & SP("clearAttributes",0,OP,"")

C=C & SP("click",0,OP,"")

C=C & SP("doscroll",1,OP,"([component])")

C=C & SP("focus",0,OP,"")

C=C & SP("insertAdjacentHTML",1,OP,"(where,html)")

C=C & SP("insertAdjacentText",1,OP,"(where,text)")

C=C & SP("scrollIntoView",1,OP,"(argStart)")

C=C & SP("setActive",0,OP,"")

C=C & SP("setAttribute",3,OP,"(AttrName,AttrVal[,Flags])")

C=C & SP("setCapture",1,OP,"([containerCapture])")

C=C & SP("setExpression",3,OP,"(PropName,expression[,language])")

C=C & SP("releaseCapture",0,OP,"")

on error goto 0

'Case"HTMLImg"

'On Error Resume Next

'For x=0 To obj.Attributes.Length-1

'C=C & SP2(obj.Attributes(x).NodeName,eval("obj." & obj.Attributes(x).NodeName),R,OP)

''If Instr(b.Attributes(x).NodeValue,"doSubmit(")>0 Then

''Chaine=Mid(b.Attributes(x).NodeValue,Instr(b.Attributes(x).NodeValue,"doSubmit("))

'''msgbox b.Attributes(x).NodeName & "=" & b.Attributes(x).NodeValue

''End If

'Next

'on error goto 0

'Case "DispDOMChildrenCollection"'childNodes

'Case "Object"'frames.external

'Case "IHTMLNamespaceCollection"'document.namespaces

'Case "IHTMLSelectionObject"'document.selection

'Case "IHTMLStyleSheetsCollection"'document.stylesheets

'Case "HTMLHeadElement"

'Case "HTMLNoShowElement"'document.all.item(?)

'Case "IHTMLFiltersCollection"

'Case "DispHTMLCurrentStyle"

'Case "IHTMLRectCollection"

'Case "DispHTMLStyle"

'Case "IHTMLRect"

'Case "IHTMLUrnCollection"

'Case "HTMLObjectElement"'applet

'HTMLBody

'HTMLHeaderElement

'HTMLPhraseElement

'HTMLBRElement

'HTMLBlockElement

'HTMLHRElement

'HTMLParaElement

'HTMLTable

'HTMLTableSection

'HTMLTableRow

'HTMLTableCell

'HTMLFontElement

'HTMLAnchorElement

'Case "DispHTMLAttributeCollection"

'Case ""

'Case ""

Case Else

C=C & "<b>Unknown typeName : " & TypeName(obj) & "</b>"

End Select

C=C & "</TABLE>"

Prop.InnerHTML=C

End Sub

</script>

<STYLE TYPE="text/css">

<!--

BODY{

font-family: "Verdana, Arial, Helvetica, sans-serif";

background-color=#001122;

color:#FFCCFF;

font-size: 8pt;

}

A{color:#AAFFCC}

BUTTON{font-size: 7pt;cursor:hand;}

TABLE.Prop{font-size: 8pt;color:#AACCFF;}

TABLE.Param{font-size: 8pt;color:#AACCFF;}

-->

</STYLE>

</head>

<body>

<Table class=Param><TR>

<TD><Button onclick='vbscript:ShowProp shApp.Windows,"shApp.Windows"'>

Init </Button></TD>

<td><input type="CheckBox" name="HideNull"

Title="Hide null values and objects set to nothing" checked=true>Hide null values</td>

</TR></table>

<Div ID=Prop></Div>

</body>

</html>

国外原文: http://www.interclasse.com/scripts/DOM_Explorer.php

【DOM浏览器(方便需要dom操作的朋友)】相关文章:

ASP 辅助工具(hta版)

学习正则帮手笨狼正则练习器

用hta实现制作的无殇 - 快书V1.1打包下载了第1/2页

用来猜后台的HTA小程序

从 HTA 中启动应用程序

做一个困难重重的hta下载者

MyHTML Player release v1.1

hta 实现的五子棋界面

hta编写的软件管理工具0.1(IE7.0测试通过)

适用于hta的Sleep函数

精品推荐
分类导航