Rumah pangkalan data tutorial mysql IHTMLElement和IHTMLElement2接口

IHTMLElement和IHTMLElement2接口

Jun 07, 2016 pm 03:49 PM
antara muka

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


Kenyataan Laman Web ini
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn

Alat AI Hot

Undresser.AI Undress

Undresser.AI Undress

Apl berkuasa AI untuk mencipta foto bogel yang realistik

AI Clothes Remover

AI Clothes Remover

Alat AI dalam talian untuk mengeluarkan pakaian daripada foto.

Undress AI Tool

Undress AI Tool

Gambar buka pakaian secara percuma

Clothoff.io

Clothoff.io

Penyingkiran pakaian AI

AI Hentai Generator

AI Hentai Generator

Menjana ai hentai secara percuma.

Artikel Panas

R.E.P.O. Kristal tenaga dijelaskan dan apa yang mereka lakukan (kristal kuning)
2 minggu yang lalu By 尊渡假赌尊渡假赌尊渡假赌
Repo: Cara menghidupkan semula rakan sepasukan
1 bulan yang lalu By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: Cara mendapatkan biji gergasi
4 minggu yang lalu By 尊渡假赌尊渡假赌尊渡假赌

Alat panas

Notepad++7.3.1

Notepad++7.3.1

Editor kod yang mudah digunakan dan percuma

SublimeText3 versi Cina

SublimeText3 versi Cina

Versi Cina, sangat mudah digunakan

Hantar Studio 13.0.1

Hantar Studio 13.0.1

Persekitaran pembangunan bersepadu PHP yang berkuasa

Dreamweaver CS6

Dreamweaver CS6

Alat pembangunan web visual

SublimeText3 versi Mac

SublimeText3 versi Mac

Perisian penyuntingan kod peringkat Tuhan (SublimeText3)

Apakah antara muka dalaman papan induk komputer yang disyorkan pengenalan kepada antara muka dalaman papan induk komputer Apakah antara muka dalaman papan induk komputer yang disyorkan pengenalan kepada antara muka dalaman papan induk komputer Mar 12, 2024 pm 04:34 PM

Apabila kami memasang komputer, walaupun proses pemasangannya mudah, kami sering menghadapi masalah dalam pendawaian Selalunya, pengguna tersilap memasangkan talian bekalan kuasa radiator CPU ke SYS_FAN Walaupun kipas boleh berputar, ia mungkin tidak berfungsi apabila komputer dihidupkan. Akan terdapat ralat F1 "CPUFanError", yang juga menyebabkan penyejuk CPU tidak dapat melaraskan kelajuan secara bijak. Mari kita berkongsi pengetahuan bersama tentang antara muka CPU_FAN, SYS_FAN, CHA_FAN dan CPU_OPT pada papan induk komputer. Sains popular pada antara muka CPU_FAN, SYS_FAN, CHA_FAN dan CPU_OPT pada papan induk komputer 1. CPU_FANCPU_FAN ialah antara muka khusus untuk radiator CPU dan berfungsi pada 12V

Paradigma pengaturcaraan biasa dan corak reka bentuk dalam bahasa Go Paradigma pengaturcaraan biasa dan corak reka bentuk dalam bahasa Go Mar 04, 2024 pm 06:06 PM

Sebagai bahasa pengaturcaraan yang moden dan cekap, bahasa Go mempunyai paradigma pengaturcaraan yang kaya dan corak reka bentuk yang boleh membantu pembangun menulis kod yang berkualiti tinggi dan boleh diselenggara. Artikel ini akan memperkenalkan paradigma pengaturcaraan biasa dan corak reka bentuk dalam bahasa Go dan memberikan contoh kod khusus. 1. Pengaturcaraan berorientasikan objek Dalam bahasa Go, anda boleh menggunakan struktur dan kaedah untuk melaksanakan pengaturcaraan berorientasikan objek. Dengan mentakrifkan struktur dan kaedah mengikat kepada struktur, ciri berorientasikan objek bagi pengkapsulan data dan pengikatan tingkah laku boleh dicapai. packagemaini

Pengenalan kepada antara muka PHP dan cara mentakrifkannya Pengenalan kepada antara muka PHP dan cara mentakrifkannya Mar 23, 2024 am 09:00 AM

Pengenalan kepada antara muka PHP dan bagaimana ia ditakrifkan PHP ialah bahasa skrip sumber terbuka yang digunakan secara meluas dalam pembangunan Web Ia fleksibel, mudah dan berkuasa. Dalam PHP, antara muka ialah alat yang mentakrifkan kaedah biasa antara pelbagai kelas, mencapai polimorfisme dan menjadikan kod lebih fleksibel dan boleh digunakan semula. Artikel ini akan memperkenalkan konsep antara muka PHP dan cara mentakrifkannya, dan menyediakan contoh kod khusus untuk menunjukkan penggunaannya. 1. Konsep antara muka PHP Antara muka memainkan peranan penting dalam pengaturcaraan berorientasikan objek, mentakrifkan aplikasi kelas

Penyelesaian kepada NotImplementedError() Penyelesaian kepada NotImplementedError() Mar 01, 2024 pm 03:10 PM

Sebab ralat adalah dalam python Sebab mengapa NotImplementedError() dilemparkan dalam Tornado mungkin kerana kaedah atau antara muka abstrak tidak dilaksanakan. Kaedah atau antara muka ini diisytiharkan dalam kelas induk tetapi tidak dilaksanakan dalam kelas anak. Subkelas perlu melaksanakan kaedah atau antara muka ini untuk berfungsi dengan baik. Cara menyelesaikan masalah ini adalah dengan melaksanakan kaedah abstrak atau antara muka yang diisytiharkan oleh kelas induk dalam kelas kanak-kanak. Jika anda menggunakan kelas untuk mewarisi daripada kelas lain dan anda melihat ralat ini, anda harus melaksanakan semua kaedah abstrak yang diisytiharkan dalam kelas induk dalam kelas anak. Jika anda menggunakan antara muka dan anda melihat ralat ini, anda harus melaksanakan semua kaedah yang diisytiharkan dalam antara muka dalam kelas yang melaksanakan antara muka. Jika anda tidak pasti yang mana

Wawasan ke dalam sistem Hongmeng: pengukuran fungsi sebenar dan pengalaman penggunaan Wawasan ke dalam sistem Hongmeng: pengukuran fungsi sebenar dan pengalaman penggunaan Mar 23, 2024 am 10:45 AM

Sebagai sistem pengendalian baharu yang dilancarkan oleh Huawei, sistem Hongmeng telah menimbulkan kekecohan dalam industri. Sebagai percubaan baharu Huawei selepas larangan AS, sistem Hongmeng mempunyai harapan dan harapan yang tinggi. Baru-baru ini, saya cukup bernasib baik untuk mendapatkan telefon mudah alih Huawei yang dilengkapi dengan sistem Hongmeng Selepas tempoh penggunaan dan ujian sebenar, saya akan berkongsi beberapa ujian berfungsi dan pengalaman penggunaan sistem Hongmeng. Mula-mula, mari kita lihat antara muka dan fungsi sistem Hongmeng. Sistem Hongmeng mengguna pakai gaya reka bentuk Huawei sendiri secara keseluruhan, yang mudah, jelas dan lancar dalam operasi. Di desktop, pelbagai

Pelaksanaan kelas dalaman antara muka dan kelas abstrak dalam Java Pelaksanaan kelas dalaman antara muka dan kelas abstrak dalam Java Apr 30, 2024 pm 02:03 PM

Java membenarkan kelas dalaman ditakrifkan dalam antara muka dan kelas abstrak, memberikan fleksibiliti untuk penggunaan semula kod dan modularisasi. Kelas dalaman dalam antara muka boleh melaksanakan fungsi tertentu, manakala kelas dalaman dalam kelas abstrak boleh mentakrifkan fungsi umum, dan subkelas menyediakan pelaksanaan konkrit.

Antara muka Java dan kelas abstrak: mendedahkan sambungan dalaman antara mereka Antara muka Java dan kelas abstrak: mendedahkan sambungan dalaman antara mereka Mar 04, 2024 am 09:34 AM

Antara Muka Antaramuka mentakrifkan kaedah abstrak dan pemalar dalam Java. Kaedah dalam antara muka tidak dilaksanakan, tetapi disediakan oleh kelas yang melaksanakan antara muka. Antara muka mentakrifkan kontrak yang memerlukan kelas pelaksanaan untuk menyediakan pelaksanaan kaedah tertentu. Isytiharkan antara muka: publicinterfaceExampleInterface{voiddoSomething();intgetSomething();} Kelas abstrak Kelas abstrak ialah kelas yang tidak boleh dibuat instantiated. Ia mengandungi campuran kaedah abstrak dan bukan abstrak. Sama seperti antara muka, kaedah abstrak dalam kelas abstrak dilaksanakan oleh subkelas. Walau bagaimanapun, kelas abstrak juga boleh mengandungi kaedah konkrit, yang menyediakan pelaksanaan lalai. Isytiharkan kelas abstrak: publicabstractcl

Adakah terdapat konsep pengaturcaraan seperti kelas di Golang? Adakah terdapat konsep pengaturcaraan seperti kelas di Golang? Mar 19, 2024 am 10:12 AM

Dalam Golang (bahasa Go), walaupun tiada konsep yang serupa dengan kelas dalam bahasa pengaturcaraan berorientasikan objek tradisional, fungsi serupa boleh dicapai melalui struktur dan kaedah. Di Golang, kita boleh mentakrifkan struktur untuk merangkum data, dan mentakrifkan kaedah untuk struktur memanipulasi data Kaedah ini boleh merealisasikan fungsi asas kelas dalam pengaturcaraan berorientasikan objek. Mula-mula, mari kita lihat contoh mudah, mentakrifkan struktur bernama Person, yang mengandungi dua medan: nama dan umur, dan struktur Person

See all articles