Google Data API

Google程式

簡介

網址服務

JavaScript

搜尋服務

繪圖服務

AppScript

Python

Java

GAE

Android

相關訊息

相關網站

相關文獻

最新修改

訊息

相關網站

參考文獻

最新修改

簡體版

English

劉言誠:wikiBlog.js

google.load("gdata", "1");

$(function(){
        $.get("page/start.txt", function(data){
                var tohtml = wiki2html(data);
                $("div[class=textPane]").html(tohtml);
        });
});

function login(){

        var scope = "http://www.google.com/calendar/feeds/";
        var token = google.accounts.user.login(scope);
        if(token != ""){
     //$("a[title=logout]").css("display", "");
                $("a[title=logout]").show();
    }
    //$(this).css("display", "none");
    $(this).hide();
    alert($(this));

}

function logout(){
        google.accounts.user.logout();
    //$("a[title=login]").css("display", "");
    //$(this).css("display", "none");
    $("a[title=login]").show();
    //$(this).hide();
    alert($(this));
}

function editText(){
        var dateTime = new google.gdata.DateTime();
   alert(dateTime.getDate());
}

function test(){ }
<html>
<head>
  <title>網路應用研究</title>
  <script src="https://www.google.com/jsapi?key=ABQIAAAATmkOKGhplAW_SrLcNMJCChQDHtZBmae3VtF8y2CruWNw50BUSBSi0ENfqoXVuIPugTDQ5niTo-NpWw" type="text/javascript"></script>
  <script src="source/jquery.js"></script>
  <script src="source/dotwiki.js"></script>
  <script src="source/wikiBlog.js"></script>

  <link rel="stylesheet" href="css/default.css" />

</head>

<body>
        <div id="menuPane">
                <a href="#" title="login" onclick="login()">登入</a> |
                <a href="#" title="logout" onclick="logout()" style="display:none;">登出</a> |
                <a href="#" title="edit" onclick="editText()">編輯</a> |
                <a href="#">管理</a>
                <a href="#" title="test" onclick="test()">test</a>
        </div>
        <div class="module">
                <div id="top">
                        <h1 class="title">網路應用與研究</h1>
                </div>
                <div id="main">
                        <div class="textPane"><p>textPane</p></div>
                </div>
                <div id="right"><p>right</p></div>      
                <div id="edit">

                </div>
        </div>
    <div id="bottom"><p>bottom</p></div>
</body>
</html>

Facebook

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-NonCommercial-ShareAlike 3.0 License