The type attribute of the embed element specifies the MIME type of the embedded content.
The type
property sets or gets the type attribute in an <embed> element.
type |
Yes | Yes | Yes | Yes | Yes |
Return the type property.
var v = embedObject.type
Set the type property.
embedObject.type=MIME_type
Value | Description |
---|---|
MIME_type | The MIME type of the embedded content. |
A String type value representing the MIME type of the embedded content.
The following code shows how to get the MIME type of the embedded content.
<!DOCTYPE html> <html> <body> <embed id="myEmbed" src="notExist.swf" type="application/x-shockwave-flash"> <p id="demo"></p> <button onclick="myFunction()">test</button> <script> function myFunction() { var x = document.getElementById("myEmbed").type; document.getElementById("demo").innerHTML = x; } </script> </body> </html>