How to work with document.embeds in JavaScript?

HTMLJavascriptProgramming Scripts

Use the document.embeds property in JavaScript to get the number of <embeds> tags in a document.

Example

You can try to run the following code to implement document.embeds property in JavaScript.

Live Demo

<!DOCTYPE html>
<html>
   <head>
      <title>JavaScript Example</title>
   </head>
   <body>
      <embed src = "/html/yourfile.mid" width = "250" height = "100" />
      <script>
         var num = document.embeds.length;
         document.write("<br>How many embed tags: "+num);
      </script>
   </body>
</html>
raja
Published on 26-Feb-2018 14:41:41
Advertisements