标签:javascript
<html> <head> <title>插件检测</title> </head> <body> <p>flash插件和QuickTime插件检测</p> <script type="text/javascript"> function hasPlugin(name){ name=name.toLowerCase(); for(var i=0;i<navigator.plugins.length;i++){ if(navigator.plugins[i].name.toLowerCase().indexOf(name)>-1){ return true; } } return false; } alert(hasPlugin("Flash")?"支持flash插件":"不支持flash插件"); alert(hasPlugin("QuickTime")?"支持QuickTime插件":"不支持QuickTime插件"); </script> </body> </html>
标签:javascript
原文地址:http://blog.csdn.net/zjc/article/details/41494109