Javascript 动画播放状态行不工作并禁用其他功能?

Javascript 动画播放状态行不工作并禁用其他功能?,javascript,html,css,css-animations,Javascript,Html,Css,Css Animations,警告:我是个疯子。我的J/S中有以下两个功能: function please() { document.getElementById("test3").innerHTML = "mercy"; } function displayAnimation() { document.getElementById('myfirst').style.animation-play-state = 'running'; document.getElementById('myfirs

警告:我是个疯子。我的J/S中有以下两个功能:

function please()
{
    document.getElementById("test3").innerHTML = "mercy";
}

function displayAnimation()
{

    document.getElementById('myfirst').style.animation-play-state = 'running';
    document.getElementById('myfirst').style.-moz-animation-play-state = 'running';
    document.getElementById('myfirst').style.-webkit-animation-play-state = 'running';

}
据我所知,他们没有任何互动。但是当我在displayAnimation()中有3行时,请()不起作用,即使我的其他J/S函数也能起作用


除此之外,当我激活displayAnimation()时,动画不会从“暂停”更改为“运行”

如果仔细查看样式属性,您会发现它们的语法无效(JavaScript语法)

-
分隔的多个单词属性的命名约定为first second-->
firstSecond
例如

style.animationPlayState
对于供应商前缀-前缀其他-->
PrefixOther
乙二醇

style.MozAnimationPlayState