jQuery Mobile开发笔记

  1. 页面计时自动跳转
1 function autoJump() {
2     var s = parseInt($("#imgMain").attr("alt")) - 1;
3     $("#imgMain").attr("alt", s);
4     if (s < 0) return false;
5     else if (s == 0) $.mobile.changePage("views/index.html","slide");
6     else setTimeout("autoJump()", 1000);
7 }
8 autoJump();

posted on 2012-05-27 13:12  宋海鹏  阅读(401)  评论(0编辑  收藏  举报

导航