搜索
首页数据库mysql教程IHTMLElement和IHTMLElement2接口

IHTMLElement和IHTMLElement2是IE浏览器(WebBrowser控件,trident内核)的两个同系列针对文档元素的接口。这两个接口都提供了以编程方式访问常见的所有元素对象的属性和方法的途径。 一、 下面还是先介绍IHTMLElement接口 。 IHTMLElement接口里有不少的变量和

        IHTMLElement和IHTMLElement2是IE浏览器(WebBrowser控件,trident内核)的两个同系列针对文档元素的接口。这两个接口都提供了以编程方式访问常见的所有元素对象的属性和方法的途径。

       一、下面还是先介绍IHTMLElement接口

      IHTMLElement接口里有不少的变量和函数,其变量大多是文档元素的属性,比如class、id、attribute、lang、tagName、InnerText、InnerHtml、OuterText、OuterHtml、child、parentElement等,还有部分是style属性,比如offsetHeight、offsetLeft、style等,另外有一部分关于该元素的动作属性,比如onclick、ondragstart、onmousedown、onmousemove等。在这些成员属性之外,还有成员方法,比如click()、getAttribute(..),另外一部分成员方法就是针对各个成员变量安排的成员函数(getXX、setXX),比如id这个属性,HRESULT get_id(BSTR *p)、HRESULT put_id(BSTR *p),对于onmousedown这个成员属性,其对应的成员函数是HRESULT get_onmousedown(VARIANT *p)、HRESULT put_onmousedown(VARIANT *p),其中VARIANT是VT_IDISPATCH类型,其细化了IDispatch接口。

all                  Retrieves the collection of all the objects in the HTML that are within the scope of this object.

children         Retrieves the collection that contains all the immediate children of this object.

className    Sets or retrieves the class of the object.

click              Simulates a click by causing the onclick event to fire.

contains       Checks whether the given element is contained within the object.

document     Gets the document object for the document that the browser is displaying.

filters            Retrieves a collection of filters for an element.

getAttribute    Retrieves the value of the specified attribute.

id                  Sets or retrieves the string identifying the object.

innerHTML    Gets or sets the HTML between the start and end tags of the object.

innerText      Sets or retrieves the text between the start and end tags of the object.

insertAdjacentHTML         Inserts the given HTML text into the element at the location.

insertAdjacentText              Inserts the given text into the element at the specified location.

isTextEdit       Retrieves whether a TextRange object can be created using the object.

lang                Sets or retrieves the language to use.

language       Sets or retrieves the language in which the current script is written.

offsetHeight                     Retrieves the height of the object relative to the layout or coordinate parent, as specified by the IHTMLElement::offsetParent property.

offsetLeft                         Retrieves the calculated left position of the object relative to the layout or coordinate parent, as specified by the IHTMLElement::offsetParent property.

offsetParent                                                   Retrieves a reference to the container object that defines the IHTMLElement::offsetTop and IHTMLElement::offsetLeft properties of the object.

offsetTop                         Retrieves the calculated top position of the object relative to the layout or coordinate parent, as specified by the IHTMLElement::offsetParent property.

offsetWidth                     Retrieves the width of the object relative to the layout or coordinate parent, as specified by the IHTMLElement::offsetParent property.

onafter              updateSets or retrieves a pointer to the event handler function associated with the onafterupdate event.

onbeforeupdate            Sets or retrieves a pointer to the event handler function associated with the onbeforeupdate event.

onclick              Sets or retrieves a pointer to the event handler function associated with the onclick event.

ondataavailable             Sets or retrieves a pointer to the event handler function associated with the ondataavailable event.

ondatasetchanged        Sets or retrieves a pointer to the event handler function associated with the ondatasetchanged event.

ondatasetcomplete       Sets or retrieves a pointer to the event handler function associated with the ondatasetcomplete event.

ondblclick                      Sets or retrieves a pointer to the event handler function associated with the ondblclick event.

ondragstart                   Sets or retrieves a pointer to the event handler function associated with the ondragstart event.

onerrorupdate              Sets or retrieves a pointer to the event handler function associated with the onerrorupdate event.

onfilterchange              Sets or retrieves a pointer to the event handler function associated with the event.

onhelp                           Sets or retrieves a pointer to the event handler function associated with the onhelp event.

onkeydown                   Sets or retrieves a pointer to the event handler function associated with the onkeydown event.

onkeypress                  Sets or retrieves a pointer to the event handler function associated with the onkeypress event.

onkeyup                       Sets or retrieves a pointer to the event handler function associated with the onkeyup event.

onmousedown             Sets or retrieves a pointer to the event handler function associated with the onmousedown event.

onmousemove            Sets or retrieves a pointer to the event handler function associated with the onmousemove event.

onmouseout                Sets or retrieves a pointer to the event handler function associated with the onmouseout event.

onmouseover              Sets or retrieves a pointer to the event handler function associated with the onmouseover event.

onmouseup                 Sets or retrieves a pointer to the event handler function associated with the onmouseup event.

onrowenter                 Sets or retrieves a pointer to the event handler function associated with the onrowenter event.

onrowexit                    Sets or retrieves a pointer to the event handler function associated with the onrowexit event.

onselectstart              Sets or retrieves a pointer to the event handler function associated with the onselectstart event.

outerHTML                 Sets or retrieves the object and its content in HTML.

outerText                   Sets or retrieves the text of the object.

parentElement         Retrieves the parent object in the object hierarchy.

parentTextEdit         Retrieves the container object in the document hierarchy that can be used to create a TextRange containing the original object.

recordNumber         Retrieves the ordinal record from the data set that generated the object.

removeAttribute      Removes an attribute from an object.

scrollIntoView          Causes the object to scroll into view, aligning it either at the top or bottom of the window.

setAttribute              Sets the value of the specified attribute.

sourceIndex            Retrieves the ordinal position of the object, in source order, as the object appears in the document's all collection.

style                         Retrieves an inline style sheet for the tag.

tagName                 Retrieves the tag name of the object.

title                         Sets or retrieves advisory information (a ToolTip) for the object.

toString                   Retrieves a string representation of the object.

二、IHTMLElement2接口的介绍

      IHTMLElement2是在IHTMLElement接口基础上加了一些成员属性和方法,以满足浏览器升级的需求。其加的属性,如readyState、readyStateValue、currentStyle、与scroll(滑动条)有关的几个属性、capture、expression、behavior等属性及其设置与删除。

onpropertychange          Sets or retrieves a pointer to the event handler function associated with the onpropertychange event.

onreadystatechange      Sets or retrieves a pointer to the event handler function associated with the onreadystatechange event.

onresize                         Sets or retrieves a pointer to the event handler function associated with the onresize event.

onrowsdelete                 Sets or retrieves a pointer to the event handler function associated with the onrowsdelete event.

onrowsinserted             Sets or retrieves a pointer to the event handler function associated with the onrowsinserted event.

onscroll                         Sets or retrieves a pointer to the event handler function associated with the onscroll event.

readyState                    Retrieves the current state of the object.

readyStateValue           Gets the current state of the object.

releaseCapture             Removes mouse capture from the object in the current document.

removeBehavior            Detaches a behavior from the element.

removeExpression        Removes the expression from the specified property.

removeFilter                 Not implemented.

replaceAdjacentText    Replaces the text adjacent to the element.

runtimeStyle                Gets the element's runtimeStyle object.

scopeName                 Gets the namespace defined for the element.

scrollHeight                 Retrieves the scrolling height of the object.

scrollLeft                     Sets or retrieves the distance between the left edge of the object and the leftmost portion of the content currently visible in the window.

scrollTop                     Sets or retrieves the distance between the top of the object and the topmost portion of the content currently visible in the window.

scrollWidth                 Retrieves the scrolling width of the object.

setCapture                Sets the mouse capture to the object that belongs to the current document.

setExpression           Sets an expression for the specified object.

tabIndex                   Sets or retrieves the index that defines the tab order for the object.

tagUrn                       Sets or gets the URN specified in the namespace declaration.

canHaveChildren      Gets a value indicating whether the object can contain child objects.

        下面说下IHTMLElement2接口的版本等问题。注意,IHTMLElement接口只需要IE4及其以上版本即可。

      Interface Information

Stock Implementation                            mshtml.dll

Custom Implementation                          No

Inherits from                                            IDispatch

Header and IDL files                                Mshtml.h, Mshtml.idl

Minimum availability                                  Internet Explorer5

Minimum operating systems                      Windows 95, Windows NT 4.0, Windows CE 4.0


声明
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
主板aafp是什么接口主板aafp是什么接口Aug 29, 2022 am 10:50 AM

主板上的aafp是音频接口;该接口的功能是启用前面板的“3.5mm”插孔,起到传输音频的作用,aafp跳线基本上由两个部分组成,一部分是固定在主板、硬盘等设备上的,由两根或两根以上金属跳针组成,另一部分是跳线帽,是一个可以活动的组件,外层是绝缘塑料,内层是导电材料,可以插在跳线针上。

cha fan表示什么风扇cha fan表示什么风扇Sep 15, 2022 pm 03:09 PM

“cha fan”表示的是机箱风扇;“cha”是“chassis”的缩写,是机箱的意思,“cha fan”接口是主板上的风扇供电接口,用于连接主板与机箱风扇,可以配合温度传感器反馈的信息进行智能的转速调节、控制噪音。

ioioi是什么接口ioioi是什么接口Aug 31, 2022 pm 04:50 PM

ioioi是指COM接口,即串行通讯端口,简称串口,是采用串行通信方式的扩展接口。COM接口是指数据一位一位地顺序传送;其特点是通信线路简单,只要一对传输线就可以实现双向通信(可以直接利用电话线作为传输线),从而大大降低了成本,特别适用于远距离通信,但传送速度较慢。

link/act是什么接口link/act是什么接口Feb 23, 2023 pm 04:14 PM

link/act是物理数据接口;交换机上的link/act指示灯表示线路是否连接或者活动的状态;通常Link/ACT指示灯用来观察线路是否激活或者通畅;一般情况下,若是线路畅通,则指示灯长亮,若是有数据传送时,则指示灯闪烁。

jbat1是什么接口jbat1是什么接口Jun 23, 2021 pm 01:38 PM

jbat1是主板电2113池放电跳线接口,对于现在市面上常见的主板来说,它们都设计有CMOS的放电跳线,让用户在操作时更加便捷,它也因此成为了CMOS最常见的放电方法。

sata6g是什么接口sata6g是什么接口Sep 14, 2022 am 11:46 AM

sata6g是数据传输速度为“6G/s”的sata接口;sata即“Serial ATA”,也就是串行ATA,是主板接口的名称,现在的硬盘和光驱都使用sata接口与主板相连,这个接口的规格目前已经发展到第三代sata3接口。

鼠标插在主机哪个接口鼠标插在主机哪个接口Sep 13, 2022 pm 03:50 PM

鼠标插在主机的串口接口、PS/2接口或USB接口上。串行接口是最古老的鼠标接口,是一种9针或25针的D型接口,将鼠标接到电脑主机串口上就能使用。PS/2接口是1987年IBM公司推出的鼠标接口,是一种鼠标和键盘的专用接口,是一种6针的圆型接口。USB接口,是一种高速的通用接口,具有非常高的数据传输率,且支持热插拔。

dc接口是什么意思dc接口是什么意思Aug 24, 2022 am 10:47 AM

dc接口是一种为转变输入电压后有效输出固定电压接口的意思;dc接口是由横向插口、纵向插口、绝缘基座、叉形接触弹片、定向键槽组成,两只叉型接触弹片定位在基座中心部位,成纵横向排列互不相连,应用于手机、MP3、数码相机、便携式媒体播放器等产品中。

See all articles

热AI工具

Undresser.AI Undress

Undresser.AI Undress

人工智能驱动的应用程序,用于创建逼真的裸体照片

AI Clothes Remover

AI Clothes Remover

用于从照片中去除衣服的在线人工智能工具。

Undress AI Tool

Undress AI Tool

免费脱衣服图片

Clothoff.io

Clothoff.io

AI脱衣机

AI Hentai Generator

AI Hentai Generator

免费生成ai无尽的。

热门文章

R.E.P.O.能量晶体解释及其做什么(黄色晶体)
2 周前By尊渡假赌尊渡假赌尊渡假赌
仓库:如何复兴队友
4 周前By尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island冒险:如何获得巨型种子
4 周前By尊渡假赌尊渡假赌尊渡假赌

热工具

mPDF

mPDF

mPDF是一个PHP库,可以从UTF-8编码的HTML生成PDF文件。原作者Ian Back编写mPDF以从他的网站上“即时”输出PDF文件,并处理不同的语言。与原始脚本如HTML2FPDF相比,它的速度较慢,并且在使用Unicode字体时生成的文件较大,但支持CSS样式等,并进行了大量增强。支持几乎所有语言,包括RTL(阿拉伯语和希伯来语)和CJK(中日韩)。支持嵌套的块级元素(如P、DIV),

SublimeText3 英文版

SublimeText3 英文版

推荐:为Win版本,支持代码提示!

Dreamweaver Mac版

Dreamweaver Mac版

视觉化网页开发工具

Atom编辑器mac版下载

Atom编辑器mac版下载

最流行的的开源编辑器

禅工作室 13.0.1

禅工作室 13.0.1

功能强大的PHP集成开发环境