Phonegap如何重用/包含HTML页面? [英] Phonegap How To Reuse/Include HTML Page?

查看:126
本文介绍了Phonegap如何重用/包含HTML页面?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道在服务器端,这可以很容易地通过服务器端脚本,但 PhoneGap 开发重点是在本地副本。我如何重用/包括a HTML 页面到另一个HTML页面(没有暴力的同源政策)?

I know in server side,this can be done easily by the server side script,but PhoneGap development focus is on the local copy.So how could I reuse/include a HTML page into another HTML page (without violent the Same Origin Policy)?

推荐答案

您可以在使用 PhoneGap 开发应用程序时使用许多好的库。如果您知道 jQuery Mobile library.Using这个库你可以包括多个html页面到一个单一的页面。我 PhoneGap developer.I已经开发单页应用程序使用 jQM

You can use many good libraries available while developing an application using PhoneGap.If you are aware of jQuery Mobile library.Using this library you can include multiple html pages into one single page.I am PhoneGap developer.I have developed single page application using this jQM library.

他们在Ajax导航上工作。因此,在客户端没有页面重新加载。这将使您的应用程序性能急剧上升。有 HTML5 localStorage.Store所有数据在一个ajax命中和浏览多个页面。

They worked on the Ajax navigation.So,no page reloading at the client side.This will make your app performance dramatically.You have HTML5 localStorage.Store all the data in one ajax hit and navigate through multiple pages.

jQuery Mobile

Here is the link: jQuery Mobile

此外您可以使用 pager.js 库加载多个 HTML code>页面到一个页面。它很容易学习。

Additionally you can use pager.js library to load multiple HTML pages into one single page.It's very easy to learn.

希望这将有助于你。

这篇关于Phonegap如何重用/包含HTML页面?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆