Javascript examples for DOM HTML Element:Embed
The height property sets or gets the type attribute in an <embed> element, which identifies the MIME type of the embedded content.
Set the type property with the following Values
Value | Description |
---|---|
MIME_type | The MIME type of the embedded content. |
A String, representing the MIME type of the embedded content
The following code shows how to return the MIME type of the embedded content:
<!DOCTYPE html> <html> <body> <embed id="myEmbed" src="helloworld.swf" type="application/x-shockwave-flash"> <button onclick="myFunction()">Test</button> <p id="demo"></p> <script> function myFunction() {/*from w ww. j ava 2 s .c o m*/ var x = document.getElementById("myEmbed").type; document.getElementById("demo").innerHTML = x; } </script> </body> </html>