开发者

Create an Image object from scratch? (Javascript)

I want to create an image object from scratch. Here is the idea:

var image = new Image();
var image2 = new Object();
/* heres where the magic is
\\\\\\\\\\\\\\\\\\\\\\\\\\\
\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
if image = image2
    alert('sucess');

The goal is that I need to edit the Image object to accept video files. I suppose the solution could also be开发者_如何学JAVA prototypical if it changed the structure of the Image object appropriately.


function videotr(){
media = document.createElement('video');
media.preload = true;
//media.controls = true;
media.className = 'c1';
media.id = 'it'; 
document.getElementById('crop').appendChild(media);
//media.loop = true;
//media.autoplay = true;


return media;

}

this works

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜