检测是浏览器还是手机,需求为是否支持FLASH,此文为检测是否支持FLASH的代码(含demo下载)
<script src="./Public/js/swfobject.js"></script><script> //flash版本检测 function CheckFlashPlayer(){ var version = deconcept.SWFObjectUtil.getPlayerVersion(); if (document.getElementById && version["major"] > 0) {// alert("你的flash播放器版本过低!请安装flash Player 10版本!11"); document.write('can'); return false; }else{// alert("您还未安装flash Player,请安装 flash Player 10版本!22"); document.write('cann\'t'); return false; } return true; } window.onload = CheckFlashPlayer</script>
?