jQuery Mobile手机网站案例

一、总结

一句话总结:jQuery Mobile是纯手机框架,和amazeui和bootstrap都可以做手机网站。

1、另一款文本编辑器?

jd编辑器

二、jQuery Mobile手机网站案例

1、index.php

 <?php
include 'common/config.php'; $sql='select * from message'; $rst=mysql_query($sql); ?>
<!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="jm/mobile.css">
<script src="jm/jquery.js"></script>
<script src="jm/mobile.js"></script>
<link rel="stylesheet" href="css/idangerous.swiper.css">
<link rel="stylesheet" href="css/style.css">
<link rel="stylesheet" href="css/swiper-demos.css">
<script src="js/idangerous.swiper-1.9.1.min.js"></script>
<script src="js/idangerous.swiper.scrollbar-1.2.js"></script>
<script src="js/swiper-demos.js"></script>
<style>
*{
min-width:0px!important;
min-height:0px!important;
} .home-device,.swiper-main,.swiper-container,.swiper1,.swiper-wrapper,.swiper-slide{
width:100%;
overflow:hidden;
} *{
font-family: 微软雅黑;
}
</style>
</head>
<body>
<div data-role="page" id="pageone">
<div data-role="header">
<h1>手机动漫</h1>
<div data-role="navbar">
<ul>
<li><a href="#a" data-theme='b' data-icon="home" data-rel='dialog'>查看动漫</a></li>
<li><a href="add.php" data-theme='b' data-icon='grid' data-rel='dialog'>发布动漫</a></li>
</ul>
</div>
</div> <div data-role="content">
<div class="home-device"><a class="arrow-left" href="#"></a> <a class="arrow-right" href="#"></a>
<div class="swiper-main">
<div class="swiper-container swiper1">
<div class="swiper-wrapper">
<div class="swiper-slide"> <img src="data:images/slider1-1.jpg" width='100%'> </div>
<div class="swiper-slide"> <img src="data:images/slider1-2.jpg" width='100%'> </div>
</div>
</div>
</div>
<div class="pagination pagination1"></div>
</div>
<p>国产动画《新大头儿子和小头爸爸》已于2013年11月28日晚20:00在中央电视台少儿频道《银河剧场》栏目首播。这部动画由诸多微小而有趣的故事组成,是一部很适合中国孩子观看的动画片。大头儿子、是个活泼可爱的大头的小孩,小头爸爸、是个给予大头儿子的是想象力的满足和对他一颗童心的一位好爸爸,围裙妈妈是一个有洁癖,但却很关心大头儿子和小头爸爸的一位家庭主妇,这三个人组成了一个三口之家,他们是中国现代家庭教育典型的缩影。这是一个普通而又平凡的家庭,但它所具有的特质是任何一个家庭都不具备的,因为它是由强烈的现实性与浓郁的幻想性所构成的。</p>
</div> <div data-role="footer">
<h1>www.lampym.com</h1>
</div>
</div> <div data-role='page' id='a'>
<div data-role='header' data-theme='b'>
<h1>查看动漫</h1>
</div>
<div data-role='content' data-theme='a'>
<ul data-role="listview" data-inset="true" data-theme='e'>
<?php
while($row=mysql_fetch_assoc($rst)){
echo "<li><a href=''>{$row['title']}</a></li>";
}
?> </ul>
</div>
<div data-role='footer' data-theme='b'>
<h1>www.lampym.com</h1>
</div>
</div>
<div data-role='page' id='b'>
<div data-role='header' data-theme='b'>
<h1>发布动漫</h1>
</div>
<div data-role='content' data-theme='a'> </div>
<div data-role='footer' data-theme='b'>
<h1>www.lampym.com</h1>
</div>
</div> </body>
<script>
function size(){
h=$('.swiper-slide img').eq(0).height();
$('.swiper-slide').height(h);
$('.swiper-slide').parentsUntil('.home-device').height(h);
} $(window).load(function(){
size();
}); $(window).resize(function(){
size();
}); $(window).on("orientationchange",function(){
size();
}); </script>
</html>

2、add.php

 <!doctype html>
<html>
<head>
<meta charset="UTF-8">
<title>index</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="jm/mobile.css">
<script src="jm/jquery.js"></script>
<script src="jm/mobile.js"></script>
<style>
*{
font-family: 微软雅黑;
} #content{
height:100px!important;
}
</style>
</head>
<body>
<div data-role="page" id="pageone">
<div data-role='header'>
<h1>发布动漫</h1>
</div>
<div data-role="content">
<form action="insert.php" method='post' data-transition="slide" data-ajax='false'>
<label for="username">发布者:</label>
<input type="text" name='username' id='username'> <label for="title">动漫标题:</label>
<input type="text" name='title' id='title'> <label for="content">动漫内容:</label>
<textarea name="content" id="content" rows='10'></textarea> <input type="submit" data-role='button' value='提交' data-inline='true' data-theme='b'>
<input type="reset" data-role='button' value='取消' data-inline='true' data-theme='e'>
</form>
</div> <div data-role="footer">
<h1>www.lampym.com</h1>
</div>
</div>
</body>
</html>

3、insert.php

 <?php
include 'common/config.php'; $username=$_POST['username'];
$time=time();
$title=$_POST['title'];
$content=$_POST['content']; $sql="insert into message(username,title,content,time) values('{$username}','{$title}','{$content}','{$time}')";
if(mysql_query($sql)){
header('location:/lampweb');
}
?>
 
 
 
 

jQuery Mobile手机网站案例的更多相关文章

  1. jquery.mobile手机网页简要

    先上最终效果: 最近做了一个用手机浏览器访问的web应用,采用较流行的HTML5,为了提高开发效率节省时间决定采用现有开源框架,免去了自己做设计与兼容性. 一些比较优秀的框架:10大优秀的移动Web应 ...

  2. 手机新闻网站,手持移动新闻,手机报client,jQuery Mobile手机新闻网站,手机新闻网站demo,新闻阅读器开发

    我们坐在地铁.经常拿出新浪手机查看新闻.腾讯新闻,或者看新闻,等刷微信功能.你有没有想过如何实现这些目标. 移动互联网.更活泼. 由于HTML5未来,jQuery Moblie未来. 今天我用jqm的 ...

  3. 手机新闻网站,掌上移动新闻,手机报client,jQuery Mobile手机新闻网站,手机新闻网站demo,新闻阅读器开发

    我们坐在地铁,经常来查看新浪手机新闻,腾讯新闻.或者刷微信看新闻更多功能.你有没有想过如何实现这些目标.移动互联网,更活泼. 因为HTML5到,jQuery Moblie到.今天我用jqm为了给你一个 ...

  4. jQuery Mobile学习日记

    本次主讲人是王思伦啦啦啦~ 框架特性 jQuery Mobile 以“Write Less, Do More”作为目标,为所有的主流移动操作系统平台提供了高度统一的 UI 框架:jQuery 的移动框 ...

  5. jQuery Mobile中文手册:开发入门

    jQuery Mobile 以“Write Less, Do More”作为目标,为所有的主流移动操作系统平台提供了高度统一的 UI 框架:jQuery 的移动框架可以让你为所有流行的移动平台设计一个 ...

  6. 18个jQuery Mobile开发贴士和教程

    jQuery Mobile 是 jQuery 在手机上和平板设备上的版本.jQuery Mobile 不仅会给主流移动平台带来jQuery核心库,而且会发布一个完整统一的jQuery移动UI框架.支持 ...

  7. jQuery Mobile案例,最近用Moon.Web和Moon.Orm做了一套系统

      一.简介 先说说,我们的主题.jQuery Mobile,最近用Moon.Web和Moon.Orm做了一套系统 jQuery Mobile是jQuery 在手机上和平板设备上的版本.jQuery ...

  8. 【学习】一本案例驱动的jQuery Mobile入门书

    清华大学出版社推出的<构建跨平台APP:jQuery Mobile移动应用实战> 提供的全是jQuery Mobile的案例: 手机入侵 题库应用 音乐专辑 通讯录 新闻列表 销售排名 九 ...

  9. SharePoint之使用Jquery Mobile定制自己的手机页面

    最近一直很忙,既要创业,又要工作,还有弄弄自己的小项目(已暂停,http://www.codelove1314.com/,如果你不愿意浪费你的业余时间,喜欢弄点小东西,请联系我),所以虽然有很多东西分 ...

随机推荐

  1. 含有打印、统计DataGridView(1)

    using System;using System.Collections.Generic;using System.Text;using System.Drawing.Printing;using ...

  2. Python数据结构同Json类型数据相互转换的用法

    在做Python接口自动化的时候,经常要用到Python数据结构同Json类型数据相互转换来供我们做进一步的验证提供数据,在此做个记录和总结 Python数据结构同Json类型数据相互转换的函数有:j ...

  3. Java基础学习总结(52)——Liunx系统Centos上搭建Java开发环境

    一.安装jdk 1.查看Linux自带的JDK是否已安装 [plain] view plain copy print? java –version 如果出现openjdk,最好还是先卸载掉openjd ...

  4. Python 极简教程(三)数据类型

    每种语言都有各种数据类型.这就像在现实生活中,我们计数的时候需要用到数字,在表述金额.重量.距离等需要精确计数时用到小数,在日常交谈中要用文字,等等.在计算机语言中,为了表述不同的情况,也需要用到各种 ...

  5. 苹果手机wifi代理设置方法--用于抓包

    杯具了!@@@@@@@变态的公司不能直接上网了,但是经过我的研究.可以用代理上网,电脑是可以了,但是的iphone肿么办,哇咔咔,不要捉急,我来告诉你怎么让你的iphone通过代理上网.动起来吧. 请 ...

  6. HDU 5372 线段树

    给出两种操作: 第i个0:在x位置插入一个长度为i的线段,并输出该线段共覆盖了多少之前增加的线段 1:删除第i次插入的线段 官方题解:对于新插入的线段,查询有多少个线段左端点大于等于该线段的左端点. ...

  7. js进阶 13-2 jquery动画滑动效果哪些注意事项

    js进阶 13-2 jquery动画滑动效果哪些注意事项 一.总结 一句话总结:滑动里面这里up是隐藏,down是显示. 1.jquery动画默认的两个切换效果是什么(swing默认和linear的区 ...

  8. Android java.lang.IllegalArgumentException: Object returned from onCreateLoader must not be a non-static inn

    AsyncTaskLoader: http://developer.Android.com/intl/zh-CN/reference/android/content/AsyncTaskLoader.h ...

  9. vue-cli 构建vue项目

    师父说,咱们还是要用vue-cli 去构建前端项目.然后我就开始了 懵逼之旅. 今天上午主要就是搞懂用webpack和vue-cli怎么搭建 运行项目 首先找到了咱们博客园 园友的博客,提供了大概五个 ...

  10. [WPF自定义控件库]使用TextBlockHighlightSource强化高亮的功能,以及使用TypeConverter简化调用

    1. 强化高亮的功能 上一篇文章介绍了使用附加属性实现TextBlock的高亮功能,但也留下了问题:不能定义高亮(或者低亮)的颜色.为了解决这个问题,我创建了TextBlockHighlightSou ...