TypeError: undefined is not an object

This question already has an answer here:

  • Detecting an undefined object property 40 answers

  • i tried like this and it seems to work

    var iframe = document.querySelector('.container iframe');
    window.frames[iframe.id].contentWindow.runAnimation();
    

    https://plnkr.co/edit/0pquvlK3beF1pqMcU1lc?p=preview

    链接地址: http://www.djcxy.com/p/22640.html

    上一篇: javascript中表达式语句的完整形式是什么?

    下一篇: TypeError:undefined不是一个对象