Reference activex controls in Javascript

Source: Internet
Author: User

To reference activex controls in js, you have to introduce the attributes of for and event in js file labels first: <scriptlanguage = "javascript" for = "window" event = "onload"> set the EVENT event or obtain the event FOR htmlFor which the script is written or the object bound to the EVENT script. This is understandable. <Script language = "javascript" for = "window" event = "onload"> equivalent to <script language = "javascript"> // bind window. attachEvent ("onload", function () {// TODO}) </script> FOR is followed by the ID of a control, for example, <object id = "window"> <object> may be a component. In the dialing system, the following code is verified: Reference activex component: <OBJECTID = "Phonic_usb" WIDTH = "" HEIGHT = "" CLASSID = "CLSID: BB4780D9-391E-41B5-B366-434ADCFD7D10 "> </OBJECT> introduce the PlugIn EVENT: <script language =" javascript "type =" text/javascript "FOR =" Phonic_usb "EVENT = PlugIn (uboxHandle)> // code executed when this event is triggered </SCRIPT> Note: Because ActiveX is a proprietary technology of Microsoft, IE can be loaded smoothly, but FireFox and other browsers need to install plug-ins.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.