Get the Param code of the object (ActiveX) in IE

Source: Internet
Author: User

For clarity, the simplest HTML and JavaScript are described below. There is such an HTML section (the head part is the standard head, And doctype uses the xhtml-transitional DTD ):
Copy codeThe Code is as follows:
<Body>
<Object classid = "clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width = "100%" height = "100%">
<Param name = "movie" value = "Test.swf"/>
<Param name = "quality" value = "high"/>
<Embed src = "Test.swf" quality = "high" pluginspage = "http://www.adobe.com/shockwave/download/download.cgi? P1_Prod_Version = ShockwaveFlash "type =" application/x-shockwave-flash "width =" 100% "height =" 100% "> </embed>
</Object>
<Object classid = "clsid: D27CDB6E-AE6D-11cf-96B8-444553540000" codebase = "http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width = "100%" height = "100%">
<Param name = "movie" value = "Test.swf"/>
<Param name = "quality" value = "high"/>
<Embed src = "Test.swf" quality = "high" pluginspage = "http://www.adobe.com/shockwave/download/download.cgi? P1_Prod_Version = ShockwaveFlash "type =" application/x-shockwave-flash "width =" 100% "height =" 100% "> </embed>
</Body>
</Object>

Now we can obtain the number of param parameters of the first object (swf) in two ways:
Copy codeThe Code is as follows:
Var o = document. getElementsByTagName ('object') [0];
Alert (o. getElementsByTagName ('param'). length );
Alert (o. childNodes. length );

Guess what the results are? Also, Let's guess what o. innerHTML is? You can try it on your own. The above results are 4 and 2 respectively. Is it strange?

Related Article

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.