2012年6月22日 星期五

jQuery Mobile初體驗


工具: Visual Studio 2012 RC
OS: Windows 8
測試在Window8 RC 上使用Visual Studio 2012 RC來開發支援JQuery Mobile的 ASP.NET Web Form。
  • 新建一個空網站
image
  • 從以下網站下載 jquery.mobile-1.1.0.js
http://jquerymobile.com/
image
image
  • 將下載的 js 檔加入Visual Studio 2012 專案中
image
  • 新增webform
image
  • code
<%@ Page Language="C#" %>
<!DOCTYPE html>
<script runat="server">
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>   
    <script type="text/javascript" src="script/jquery-1.7.2.js"></script>
    <script type="text/javascript" src="script/jquery.mobile-1.1.0.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div data-role="page">
        <div data-role="header">
            <h1>jQuery Mobile Demo</h1>
        </div>
        <div data-role="content">
            <p>第一個jQuery Mobile 程式</p>
        </div>
    </div>
    </form>
</body>
</html>
  • Run
image

沒有留言:

總網頁瀏覽量