Common HTML controls and daily widgets in Windows 8

Source: Internet
Author: User
Common HTML controls and daily widget examples demonstrate how to use and style common controls: buttons, check boxes, file upload, progress, range/slider, single choice button, selection, and text control. For more information, see: • Quick Start: Adding HTML controls and processing events • Encoding Basic applications. Program • Quick Start: Add JavaScript controls and styles in the Windows library • Quick Start: Adjust the style of controls • the example of a control list is written in HTML, CSS, and JavaScript. For the XAML version, see the basic XAML control example. ( 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 ;
}
}
});

})();

FunctionSendmessage (){
VaRData = 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;
}

FunctionCalculate1plus1 (){
VaRResult = 1 + 1;
Document. getelementbyid ("calculate1plus1result"). innertext = "The result is" + Result + ".";

}

 

Complete example: // files/risk/windows8/example of HTML control and routine parts sample.rar

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

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.