在JS中创建动态变量和函数

|| 我是JS的新手,但对AS2(Flash)熟悉。在Flash中,我可以将变量放入动画片段(对象)中,并尝试通过下拉菜单执行类似的操作: http://tamalecreative.com.au/korban/scripts/dropdown.js 特别:
   function dropOpen() {
       dropClose(this)
       this.overTrue = true;
       console.log(this.overTrue);
       myNum = 0;
       this.liLength = ($(this).find(\'ul\').children().length)+1;
       for (i=0;i<=this.liLength;i++) {
           this.animateTimer = window.setTimeout(animateIn, (80 * i), this);
       }
   };
我的问题是使用\'this.overTrue \'布尔变量。它似乎可以在除IE之外的所有内容中使用。我收到错误消息“ \ overTrue \”不存在。自从我从未声明过哪种方法对我来说有意义。我有办法在\'this \'内声明var \'overTrue \'吗?还是我要以完全错误的方式来解决这个问题? 提前致谢     
已邀请:
        好像IE搞砸了最后一个参数,可能的解决方法可能是:
var that = this;
this.animateTimer = window.setTimeout(function() {
  animateIn(that);
}, (80 * i));
在每个“理智”的浏览器中,
setTimeout
签名如下:
window.setTimeout(func, delay, [param1, param2, ...]);
但是在IE中,签名略有不同:
window.setTimeout(vCode, iMilliSeconds [, sLanguage])
Bravo IE。你使我再惊讶一次     

要回复问题请先登录注册