今日做实验,实现flash交互
源码:
<%--
Created by IntelliJ IDEA.
User: zhang
Date: 2023/11/26
Time: 17:12
To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!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="flash9023.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="flash9023.swf" width="800" height="600"></object>';
}
</script>
</body>
</html>
运行截图:
标签:11,26,flash,打卡,flashContainer,browser From: https://www.cnblogs.com/yunbianshangdadun/p/17857977.html