How to work with document.embeds in JavaScript?

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


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

Live Demo

<!DOCTYPE html>
      <title>JavaScript Example</title>
      <embed src = "/html/yourfile.mid" width = "250" height = "100" />
         var num = document.embeds.length;
         document.write("<br>How many embed tags: "+num);