/*
Javascript Essentials
by Jason J. Manger
Publisher: Mcgraw-Hill Osborne Media;
ISBN: 0078822343
*/
<!--
Program 12-2
-->
<html>
<head>
<script language="JavaScript">
<!--
document.write("There are <b>" + navigator.plugins.length +
"</b> plug-ins installed.<p>");
document.write("<table border=1 width='100%' cellpadding=5>" +
"<tr valign='top'>" +
"<td bgcolor='Aqua' width='25%'>Name</td>" +
"<td bgcolor='Aqua' width='25%'>Description</td>" +
"<td bgcolor='Aqua' width='25%'>Filename</td>" +
"<td bgcolor='Aqua' width='15%'>Suffixes / MIME " +
"type</td>" +
"</tr>");
// Scan through each plug-in:
for (n=0; n < navigator.plugins.length; n++) {
document.write("<tr valign='top'>" +
"<td><b>" + navigator.plugins[n].name +
"</b></td>" +
"<td>" + navigator.plugins[n].description +
"</td>" +
"<td>" + navigator.plugins[n].filename +
"</td><td>");
// Scan through this plug-in's suffixes array:
for (m=0; m < navigator.plugins[n].length; m++) {
document.write(navigator.plugins[n][m].suffixes + " = " +
navigator.plugins[n][m].type +
"<br>");
}
document.write("</td></tr>");
}
document.write("</table>");
//-->
</script>
</head>
</html>
|