1. Overall design
2. Database design
--新闻类别表 create table news_cate( news_cateid int primary key auto_increment, news_iconurl varchar(50), news_catname varchar(5), news_catedesc varchar(500)); --新闻数据表 create table news_data( news_id int primary key auto_increment, news_title varchar(50), news_content varchar(500), news_source varchar(50), news_cateid int, news_adddate datetime );
3. System cover development
练习
阳光小强
心是一个人的翅膀,心有多大世界就有多大,每个人都有一颗不平凡的心——相信自己
正在加载数据...
©2014 blog.csdn.net/dawanganban studio
Introduced two js file
rttopHtml5.base.js
var rttophtml5mobi = { author: 'tgrong', version: '1.0', website: 'http://localhost' } rttophtml5mobi.utils = { setParam: function(name, value) { localStorage.setItem(name, value) }, getParam: function(name) { return localStorage.getItem(name) } }
Basic Property settings
rttopHtml5.new.js
//封面页面创建事件 function changepage() { window.location.href = "index.htm"; } $('#load_index').live("pagecreate", function() { var id = setInterval("changepage()", 3000); })
Create a changepage() function, set the window object location.href path, and bind the pagecreate of this page event, execute the changepage() method every 3 seconds.
index.htm
The above is Xiaoqiang’s The Road to HTML5 Mobile Development (48) - (Small Exercise) The content of the news subscription system [1]. For more related content, please pay attention to the PHP Chinese website (m.sbmmt.com)!