39,083
社区成员
发帖
与我相关
我的任务
分享
<!DOCTYPE html>
<html>
<head>
<script>
function showMsg()
{
alert("You have changed the size of the browser window!");
}
</script>
</head>
<body>
<p>Try to resize the browser window.</p>
<video src="http://res1.windows.microsoft.com/resbox/zh-hans/6.2/main/8cf272a4-914d-4ad6-b991-8799b23caf17_4.mp4" controls="controls" onresize="showMsg()"/>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<script>
function showMsg()
{
alert("You have changed the size of the browser window!");
}
function OnFullscreen(el){
console.info( el.offsetWidth , screen.width )
if(el.clientWidth== screen.width){
showMsg();
}else{
}
}
</script>
</head>
<body>
<p>Try to resize the browser window.</p>
<video src="http://res1.windows.microsoft.com/resbox/zh-hans/6.2/main/8cf272a4-914d-4ad6-b991-8799b23caf17_4.mp4"
controls="controls" onwebkitfullscreenchange="OnFullscreen(this)" onresize="OnFullscreen(this)"/>
</body>
</html>