jQuery Mobile 簡介與安裝

來源:互聯網
上載者:User

標籤:style   blog   class   code   java   tar   

一、什麼是 jQuery Mobile?

  jQuery Mobile 是一個為觸控最佳化的架構,用於建立移動 web 應用程式。

  jQuery 適用於所有流行的智能手機和平板電腦:

  jQuery Mobile 構建於 jQuery 庫之上,這使其更易學習,如果您通曉 jQuery 的話。

  它使用 HTML5、CSS3、JavaScript 和 AJAX 通過儘可能少的代碼來完成對頁面的布局。

 

 

二、向網頁中添加 jQuery Mobile

1、從 CDN 引用 jQuery Mobile(推薦)

    CDN (Content Delivery Network) 用於通過 web 來分發常用的檔案,以此加快使用者的下載速度。與 jQuery 類似,無需在您的電腦上安裝任何程式;您只需直接在 HTML 頁面中引用以下樣式表和 JavaScript 庫,這樣 jQuery Mobile 就可以工作了:

<head><link rel="stylesheet" href="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.css"><script src="http://code.jquery.com/jquery-1.8.3.min.js"></script><script src="http://code.jquery.com/mobile/1.3.2/jquery.mobile-1.3.2.min.js"></script></head>

 

2、從 jQuerymobile.com 下載 jQuery Mobile 庫

  如果您希望在伺服器上存放 jQuery Mobile,您可以從 jQuerymobile.com 下載檔案。

<head><link rel=stylesheet href=jquery.mobile-1.3.2.css><script src=jquery.js></script><script src=jquery.mobile-1.3.2.js></script></head>

提示:請將下載的檔案放到您希望使用的檔案夾中。

提示:您是不是奇怪為什麼 <script> 標籤中沒有 type="text/javascript" 屬性?在 HTML5 中該屬性不是必需的。JavaScript 是 HTML5 以及所有現代瀏覽器中的預設指令碼語言!

 

 

 

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.