Home >Web Front-end >JS Tutorial >JavaScript implements youku's video code adaptive width_javascript skills

JavaScript implements youku's video code adaptive width_javascript skills

WBOY
WBOYOriginal
2016-05-16 15:57:411140browse

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"
Statement:
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
Previous article:Implementation code sharing for obtaining mouse pointer coordinates with Js and JQuery_javascript skillsNext article:Implementation code sharing for obtaining mouse pointer coordinates with Js and JQuery_javascript skills

Related articles

See more