开发者

Javascript playing a video - what am i doing wrong?

开发者 https://www.devze.com 2022-12-28 16:47 出处:网络
I think the code is self-explanatory, the button doesn\'t work, what am I doing wrong? Using Chrome. http://jsb开发者_运维知识库in.com/ugoni3/editYour code gives:

I think the code is self-explanatory, the button doesn't work, what am I doing wrong?

Using Chrome.

http://jsb开发者_运维知识库in.com/ugoni3/edit


Your code gives:

Uncaught TypeError: Object # has no method 'play'

Note the get() below in order to get the DOM object:

$(function () {
  $('input').click(function () {
    $('video').get(0).play();
  });
});​
0

精彩评论

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