如何在JavaScript对象文字中使用变量作为键?
为什么以下工作?
<something>.stop().animate(
{ 'top' : 10 }, 10
);虽然这不起作用:
var thetop = 'top';<something>.stop().animate(
{ thetop : 10 }, 10);为了使它更清晰:目前我无法将CSS属性作为变量传递给animate函数。
犯罪嫌疑人X
饮歌长啸
人到中年有点甜
随时随地看视频慕课网APP
相关分类