且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

javascript MouseWheel事件&视频音量-防止页面滚动

更新时间:2023-12-01 23:02:52

您将希望向if语句中添加条件以将其打开或关闭,如下所示:

You will want to add a condition to your if statement to turn it up or down like so:

if(delta== 1 && popo.volume <= 0.9){popo.volume+=0.1;}
if(delta== -1 && popo.volume > 0.1){popo.volume-=0.1;}

演示