清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
<!DOCTYPE html > <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>简易影片播放器</title> <script type="text/javascript"> function playOrPauseVideo(){ var videoUrl=document.getElementById("videoUrl").value; var video=document.getElementById("video"); //影片不为播放状态 if(video.paused) { //URL改变时,重新加载 if(videoUrl!=video.src) { video.src=videoUrl; video.load(); } else {//播放 video.play() } document.getElementById("playButton").value="暂停"; } else { //暂停 video.pause(); document.getElementById("playButton").value="播放"; } } </script> </head> <body> <!--建议使用谷歌浏览器浏览,看看运行的效果吧--> <video id="video" width="400" height="300" autoplay></video><br /> 影片的URL:<input type="text" id="videoUrl"/> <input id="playButton" type="button" onclick="playOrPauseVideo()" value="播放"/> </body> </html>