一旦這個問題指向我,我會感覺自己像個白癡,但是我有一個語法錯誤,我找不出問題來自哪裏。這裏是我的代碼(在最後一行出現錯誤,但我懷疑它是導致該行):我找不到這個語法錯誤
// 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