Use JavaScript + HTML to develop Win8 app-Hello World

Source: Internet
Author: User

In the Win8 + vs2012 environment, apart from using C #, C ++ to develop Win8 apps, we can also use JS + HTML to directly develop Win8 apps. This is indeed a magic thing. Experience today ~

1. Create a blank Application

2.modify default.html

In the body, a button is added with the standard HTML input control.

3. bind an event to the button

After a project is created, vs automatically references default. js.

We can bind the Js of the eventCodePut it here.

The default comment has been clearly written. Where to write the initialization code at startup and the code at recovery. This is a bit similar to app. XAML of WP7/8.

4. Add click events

In default. JS, write the specific implementation of click events in front of APP. Start. The alert method cannot be used here. Use the messagedialog ~ encapsulated by Ms ~

Try it ~~

 

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.