วันนี้ฉันศึกษาเทคโนโลยี Flex และทำการสาธิตเล็ก ๆ ในระหว่างการทดสอบฉันพบว่าข้อผิดพลาดมักเกิดขึ้น หลังจากตรวจสอบออนไลน์ฉันพบว่ามันเกิดจากเครื่องเล่นแฟลชเบราว์เซอร์รุ่นต่ำ (ต้องใช้ 10 ขึ้นไป) ในเรื่องนี้ฉันสรุปวิธีการตัดสินข้อมูลผู้เล่นแฟลชเบราว์เซอร์ด้วยสคริปต์ JavaScript:
<! doctype html public "-// w3c // dtd html 4.01 transitional // en"> <html> <head> <title> javaScript กำหนดข้อมูลของเบราว์เซอร์แฟลช checkflashplayer () {var hasflashplayer = 0; // ตัดสินว่า Flash Player var flashplayerversion = 0; // เวอร์ชัน Flash Player ถ้า (document.all) {var shockwaveflash = new ActiveXObject ('shockwaveflash.shockwaveflash'); if (shockwaveflash) {hasflashplayer = 1; flashplayerversion = parseint (shockwaveflash.getVariable ("$ version"). แยก (") [1] .split (", ") [0]);}} อื่นถ้า (Navigator.plugins && navigator.plugins.length> 0) Hasflashplayer = 1; {hasflashplayer: hasflashplayer, flashplayerversion: flashplayerversion}; window.location.href = "http://get.adobe.com/cn/flashplayer/" rel = "nofollow ภายนอก" rel = "nofollow ภายนอก"; Flash Player, ติดตั้งทันที? ")) {window.location.href =" http://get.adobe.com/cn/flashplayer/ "rel =" ภายนอก nofollow "rel =" ภายนอก nofollow "; }} </script> </head> <body> </body> </html>