Home > Web Front-end > H5 Tutorial > body text

Xiaoqiang's HTML5 mobile development road (48) - (Small exercise) News subscription system [1]

黄舟
Release: 2017-02-15 13:40:40
Original
1131 people have browsed it

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
     );
Copy after login


3. System cover development


 


练习







阳光小强

心是一个人的翅膀,心有多大世界就有多大,每个人都有一颗不平凡的心——相信自己

正在加载数据...

©2014 blog.csdn.net/dawanganban studio

Copy after login

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)
    }
}
Copy after login


Basic Property settings

rttopHtml5.new.js


//封面页面创建事件
function changepage() {
    window.location.href = "index.htm";
}
$('#load_index').live("pagecreate", function() {
    var id = setInterval("changepage()", 3000);
})
Copy after login

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





练习






阳光新闻

Copy after login


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)!



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!