有人可以解释为什么当我放大我的网页浏览器时这个js脚本不起作用吗?
function resizePlayer(){
if(jwplayer().getWidth() == 596) {
jwplayer().resize(1004,565);
} else {
jwplayer().resize(596,335);
}
};
答案 0 :(得分:1)
function resizePlayer(){
if(jwplayer().getWidth() == 596) {
jwplayer().resize(1004,565);
} else {
jwplayer().resize(596,335);
}
};
you need attach the listener to an element such as window :
window.onresize = resizePlayer;