如何列出浏览器中安装的所有插件?
要列出Web浏览器中安装的所有插件,请使用JavaScript导航器对象。JavaScript导航器对象包含一个称为插件的子对象。该对象是一个数组,在浏览器上安装的每个插件都有一个条目。
示例
您可以尝试运行以下代码来列出浏览器中安装的所有插件:
<html>
<head>
<title>List of Plug-Ins</title>
</head>
<body>
<table border="1">
<tr>
<th>Plug-in Name</th>
<th>Filename</th>
<th>Description</th>
</tr>
<script>
for (i = 0; i < navigator.plugins.length; i++)
{
document.write("<tr><td>");
document.write(navigator.plugins[i].name);
document.write("</td><td>");
document.write(navigator.plugins[i].filename);
document.write("</td><td>");
document.write(navigator.plugins[i].description);
document.write("</td></tr>");
}
</script>
</table>
</body>
</html>