javascript - a function that makes a inner html with a video tag -


can pls fix javascript function:

function open(file, poster) { document.getelementbyid("video").innerhtml = "<video class='right' width='320' height='240' controls poster='" + poster + "'>   <source src='" + file + "' type='video/mp4'>   browser not support video tag. </video>" } 

and sure, when call it, call this:

open(file.mp4, poster.png); 

or this:

open("file.mp4", "poster.png"); 

all did wrong multiline string - not idea injavascript

function openvideo(file, poster) {     document.getelementbyid("video").innerhtml = "<video class='right' width='320' height='240' controls poster='" + poster + "'><source src='" + file + "' type='video/mp4'>your browser not support video tag.</video>" } // call using following format openvideo('file.mp4', 'poster.png'); 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -