一旦这个问题指向我,我会感觉自己像个白痴,但是我有一个语法错误,我找不出问题来自哪里。这里是我的代码(在最后一行出现错误,但我怀疑它是导致该行):我找不到这个语法错误
// handle GCM notifications for Android
function onNotificationGCM(e) {
switch(e.event)
{
case 'registered':
if (e.regid.length > 0)
{
// Your GCM push server needs to know the regID before it can push to this device
// here is where you might want to send it the regID for later use.
PushWoosh.appCode = "33F93-5013B";
PushWoosh.register(e.regid, function(data) {
alert("PushWoosh register success: " + JSON.stringify(data));
}, function(errorregistration) {
alert("Couldn't register with PushWoosh" + errorregistration);
});
}
break;
感谢球员,我在这里感觉就像个白痴,是令人沮丧的一天了。
提示:http://jslint.com或http://jshint.com – 2013-04-29 19:48:37
你能给出实际的错误吗? – 2013-04-29 19:49:13
根据javascriptlint.com它是“SytaxError:语法错误”。虽然我发现如果删除我的代码的特定部分,错误消失。让我编辑它并显示我认为的故障码。感谢球员 – nikobradshaw 2013-04-29 19:51:53