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?