JS to invoke the OCX control

Source: Internet
Author: User

The project often encountered JS in order to invoke the C + + control situation, through the control to implement the related function operation. such as video controls, etc.

ClassID of Reference object in specific JS

The code reference is as follows:

<body id= "Body" onload= "initlocalparam (); init ();" >
<div id= "div" style= "width:100%;height:100%;" >
<object classid= "clsid:61978326-6772-4595-9ec3-d23c5cd5e61f"
Width= "100%" height= "100%" id= "Xxocx" name= "Xxocx" ></object>
</div>
</body>

JS to invoke the method in the control, as long as you get the control by ID

var ocx = document.getElementById ("Xxocx");
Ocx. Setlayoutmode (0); Control, set the window mode

Ocx. Setplayparam (XML); Play

JS to invoke the OCX control

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.