5
目前正在设计一个游戏,这个想法是,一个高分的,所以,当目前的得分比本地存储一个更多的则是替代:设置在本地存储变量
localStorage.setItem('highScore', highScore);
var HighScore = localStorage.getItem('highScore');
if (HighScore == null || HighScore == "null") {
HighScore = 0;
}
if (user.points > HighScore) {
highScore = parseInt(HighScore);
}
return highScore
谢谢你们
你的问题是什么? – nullability 2013-04-26 21:32:21
如何修复它,因为它不工作? – 2013-04-26 21:41:44
定义不起作用 – 2013-04-26 21:43:30