我这样做,我在isReady
行上收到错误。
我做错了什么?
var CTRecorder = {
returnCheckFile:function(bool){
alert(bool);
}
isReady:function(){
alert("the player is ready");
}
timeArray:function(x){
$("#timeArrayDIV").html(x);
}
};
答案 0 :(得分:2)
您需要逗号,因为您正在定义一个对象:
var CTRecorder =
{
returnCheckFile:function(bool){
alert(bool);
},
isReady:function(){
alert("the player is ready");
},
timeArray:function(x){
$("#timeArrayDIV").html(x);
}
};
答案 1 :(得分:2)
每个函数定义后都需要逗号,例如:
var CTRecorder =
{
returnCheckFile:function(bool){
alert(bool);
},
isReady:function(){
alert("the player is ready");
},
timeArray:function(x){
$("#timeArrayDIV").html(x);
}
};