Sử dụng thuộc tính document.embeds trong JavaScript để lấy số lượng thẻ
Ví dụ
Bạn có thể thử chạy mã sau để triển khai thuộc tính document.embeds trong JavaScript.
<!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>