<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>SWF Player</title> </head> <body> <div id="flash-container"> <p>Your browser doesn't support Adobe Flash. Please update to a modern browser.</p> </div> <script> var flashContainer = document.getElementById('flash-container'); var flashMovie = '<embed src="flash1333.swf" width="800" height="600">'; // Check if the browser supports the embed element if ('ActiveXObject' in window) { // Internet Explorer flashContainer.innerHTML = flashMovie; } else { // Other browsers flashContainer.innerHTML = '<object type="application/x-shockwave-flash" data="flash1333.swf" width="800" height="600"></object>'; } </script> </body> </html>
标签:总结,25,23.11,flashMovie,innerHTML,var,flashContainer,browser From: https://www.cnblogs.com/laobing6214/p/17858001.html