multiplayerpiano.com
我可以一次混合JavaScript和jQuery吗?
$(document).on("mousemove".function(evt) {
if (ebsprite.start = true) {
ebsprite.stop()}
)}
答案 0 :(得分:4)
很多语法错误,
$(document).on("mousemove", function(evt) {
//--------------------------^ use comma instead of . to pass parameters
if(ebsprite.start === true ) { // = is an assignment operator use === instead
ebsprite.stop()
}
});
//^ close your brackets properly here
答案 1 :(得分:1)
coma
不是dote
,并且在您的情况下再添加一个=
$(document).on("mousemove", function(evt) {
if (ebsprite.start == true) {
ebsprite.stop()
}
})