Home > Web Front-end > JS Tutorial > body text

JavaScript implements youku's video code adaptive width_javascript skills

WBOY
Release: 2016-05-16 15:57:41
Original
1114 people have browsed it

Since the content is edited in the website editor, I have always wanted to use CSS to solve it, but the methods found have obvious flaws. In the end, I was forced to use scripts to control the height of the columns. The code is as follows:

Copy code The code is as follows:


http://player.youku.com/player.php/sid/XMjg4NzkzMjQ4/v.swf"allowfullscreen="true"quality="high"width="90% "align="middle"allowscriptaccess="always"type="application/x-shockwave-flash"/>

document.getElementById("movie").style.height=document.getElementById("movie").scrollWidth*0.8 "px"
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template