Hello Dojo Primer

Source: Internet
Author: User

After understanding several Ajax frameworks, the Dojo framework was finally selected. GWT thinks it's a waste of time because ext is unstable.

One: Download Dojo, address is: http://dojotoolkit.org/downloads

Second: Do the development, of course, to the tool library API Help document, in the download address of the other menu.

Three: Getting Started program Hello Dojo. A simple primer that can increase interest and confidence, while also having a simple understanding of Dojo.

New Project Todojo in MyEclipse;

Create a new folder in WebRoot Dojoroot, put Dojo-related development lib below, including Dijit, Dojo,dojox, util;

Create a new hello.html file; (previously in the JSP, but always run unsuccessfully, do not know why?) )

〈head〉
    〈title〉dojo:hello world!〈/title〉
    "!--section 1--〉 〈style type=" text/css "
        @import" Dojoroot /dijit/themes/tundra/tundra.css ";
        @import "Dojoroot/dojo/resources/dojo.css"
    〈/style〉
    〈script type= "Text/javascript" src= Dojo.js " 
      djconfig=" parseonload:true "〉〈/script〉 
 〈script type=" Text/javascript " 
       //Load Dojo ' s code relating to the button widget
       dojo.require ("Dijit.form.Button");
    〈/script〉
  〈/head〉

In the body, add the following:

〈button dojotype= "Dijit.form.Button" id= "Hellobutton" 〉hello dojo!〈script type= "Dojo/method" event= "OnClick"
     Alert (' You pressed the button ');
  〈/script〉〈/button〉

In this way, you can see a more beautiful button, press up and pop a MessageBox.

Next, you can refer to Dijit/demos under the example, such as form.html, mail.html Open study.

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.