How can I get the html5 video element's width and height

后端 未结 2 1203
忘了有多久
忘了有多久 2020-12-16 15:31

I have a simple html5 video tag:

 
2条回答
  •  臣服心动
    2020-12-16 15:58

    Just found out that we can get the video width and height as:

    $("#video").innerHeight();
    $("#video").innerWidth();
    

    These two functions are exposed by jQuery.

    Another reason why jQuery rocks!!!

提交回复
热议问题