<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head><title>Video Resize</title></head>
<body>
<div style="text-align:center">
<button onclick="previous()"> << </button>
<button onclick="playPause()">Play/Pause</button>
<button onclick="makeSmall()">Small</button>
<button onclick="makeNormal()">Normal</button>
<button onclick="makeBig()">Big</button>
<button onclick="next()"> >> </button>
<br>
<video id="video1" width="320" >
<source src="gizmo.mp4" type="video/mp4" border="10">
<source src="test1.swf" type="swf" border="10">
</video>
</div>
<script>
var myVideo=document.getElementById("video1");
function playPause()
{
if (myVideo.paused)
myVideo.play();
else
myVideo.pause();
}
function makeBig()
{
myVideo.width=1000;
}
function makeSmall()
{
myVideo.width=320;
}
function makeNormal()
{
myVideo.width=480;
}
</script>
</body>
</html>
如何在点击按钮后将.swf文件全屏显示,并再次点击它时以默认大小显示。例如:如果我点击“大”,则.swf文件应以全屏显示。如果我点击“正常”,则它应以正常大小显示。如果我点击“默认”,则它应以默认大小显示。请为我提供上述问题的解决方案。
提前致谢。