


Xiaoqiang's HTML5 mobile development road (48) - (Small exercise) News subscription system [1]
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
<!DOCTYPE html> <html> <head> <title>练习</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" /> <link href="css/jquery.mobile-1.0.1.min.css" rel="stylesheet" type="text/css"/> <link href="css/rttopHtml5.css" rel="stylesheet" type="text/css"/> <script src="js/jquery-1.6.4.js" type="text/javascript" ></script> <script src="js/jquery.mobile-1.0.1.js" type="text/javascript" ></script> </head> <body> <p data-role="page" id="load_index" data-theme="c"> <p data-role="header" data-position="fixed"> <h4 id="阳光小强">阳光小强</h4> </p> <p class="border_p01"></p> <p class="load"> <p class="t">心是一个人的翅膀,心有多大世界就有多大,每个人都有一颗不平凡的心——相信自己</p> <p><img src="/static/imghwm/default1.png" data-src="images/rttop_loading.gif" class="lazy" alt="" /></p> <p class="l">正在加载数据...</p> </p> <p data-role="footer" data-position="fixed" > <h1 id="nbsp-blog-csdn-net-dawanganban-nbsp-studio">©2014 blog.csdn.net/dawanganban studio</h1> </p> </p> <script src="js/rttopHtml5.base.js" type="text/javascript"></script> <script src="js/rttopHtml5.news.js" type="text/javascript" ></script> </body> </html> </html>
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
<!DOCTYPE html> <html> <head> <title>练习</title> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0;" /> <link href="css/jquery.mobile-1.0.1.min.css" rel="stylesheet" type="text/css"/> <script src="js/jquery-1.6.4.js" type="text/javascript" ></script> <script src="js/jquery.mobile-1.0.1.js" type="text/javascript" ></script> </head> <body> <p data-role="page" id="index_index"> <p data-role="header" data-position="fixed" data-position="inline"> <h4 id="阳光新闻">阳光新闻</h4> </p> <p data-role="content"> </p> <p data-role="footer" data-position="fixed" > <h1></h1> </p> </p> </body> </html>
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 (www.php.cn)!

H5 is not just the abbreviation of HTML5, it represents a wider modern web development technology ecosystem: 1. H5 includes HTML5, CSS3, JavaScript and related APIs and technologies; 2. It provides a richer, interactive and smooth user experience, and can run seamlessly on multiple devices; 3. Using the H5 technology stack, you can create responsive web pages and complex interactive functions.

H5 and HTML5 refer to the same thing, namely HTML5. HTML5 is the fifth version of HTML, bringing new features such as semantic tags, multimedia support, canvas and graphics, offline storage and local storage, improving the expressiveness and interactivity of web pages.

H5referstoHTML5,apivotaltechnologyinwebdevelopment.1)HTML5introducesnewelementsandAPIsforrich,dynamicwebapplications.2)Itsupportsmultimediawithoutplugins,enhancinguserexperienceacrossdevices.3)SemanticelementsimprovecontentstructureandSEO.4)H5'srespo

The tools and frameworks that need to be mastered in H5 development include Vue.js, React and Webpack. 1.Vue.js is suitable for building user interfaces and supports component development. 2.React optimizes page rendering through virtual DOM, suitable for complex applications. 3.Webpack is used for module packaging and optimize resource loading.

HTML5hassignificantlytransformedwebdevelopmentbyintroducingsemanticelements,enhancingmultimediasupport,andimprovingperformance.1)ItmadewebsitesmoreaccessibleandSEO-friendlywithsemanticelementslike,,and.2)HTML5introducednativeandtags,eliminatingthenee

H5 improves web page accessibility and SEO effects through semantic elements and ARIA attributes. 1. Use, etc. to organize the content structure and improve SEO. 2. ARIA attributes such as aria-label enhance accessibility, and assistive technology users can use web pages smoothly.

"h5" and "HTML5" are the same in most cases, but they may have different meanings in certain specific scenarios. 1. "HTML5" is a W3C-defined standard that contains new tags and APIs. 2. "h5" is usually the abbreviation of HTML5, but in mobile development, it may refer to a framework based on HTML5. Understanding these differences helps to use these terms accurately in your project.

H5, or HTML5, is the fifth version of HTML. It provides developers with a stronger tool set, making it easier to create complex web applications. The core functions of H5 include: 1) elements that allow drawing graphics and animations on web pages; 2) semantic tags such as, etc. to make the web page structure clear and conducive to SEO optimization; 3) new APIs such as GeolocationAPI support location-based services; 4) Cross-browser compatibility needs to be ensured through compatibility testing and Polyfill library.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

SecLists
SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment