windows8 常見的HTML控制項和日常小組件

來源:互聯網
上載者:User
常見的HTML控制項和日常小組件樣本展示了如何使用和風格的幾個常用控制:按鈕、複選框、檔案上傳,進步,射程/滑球、選項按鈕、選擇和文本控制項。更多資訊在概念和api展現在這個樣本,請參閱:•快速入門:添加HTML控制項和處理事件•編碼基本的應用程式•快速入門:Windows庫添加JavaScript控制項和樣式•快速入門:調整控制項的樣式•控制列表這個樣本是寫在HTML、CSS和JavaScript。 對於XAML版本,請參見XAML基本控制樣本。(function () {
    "use strict";
    var page = WinJS.UI.Pages.define("/html/button.html", {
        ready: function (element, options) {
            //check which stylesheet is currently loaded
            //ui-light by default
            if (document.styleSheets[3].disabled === true) {
                document.getElementById("darkStyle").checked = false;
                document.getElementById("lightStyle").checked = true;
            } else if (document.styleSheets[0].disabled === true) {
                document.getElementById("darkStyle").checked = true;
                document.getElementById("lightStyle").checked = false;
            }
        }
    });

})();

function sendMessage() {
    var data = document.getElementById("message").value;

    // put your code here to send out message. Recommend using AJAX to avoid page switch.

    document.getElementById("sendMessageResult").innerText = "Your message has been sent: " + data;
}

function calculate1Plus1() {
    var result = 1 + 1;
    document.getElementById("calculate1Plus1Result").innerText = "The result is " + result + ".";

 

完整樣本:/Files/risk/windows8/常見的HTML控制項和日常小組件sample.rar 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在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.