Dojo learning notes (12): dojo Form Controls

Source: Internet
Author: User

1. Subject

Dijit has four themes to choose from: Claro, tundra, Soria, and nihilo.

To use dijit theme, you also need to introduce the CSS file of the theme and add the CSS style name to the body element on your page.

<! Doctype HTML> 

Note: You can use Div block-level elements to restrict dijit themes to only a small part of a page. If CSS is not set on the body, then any pop-up parts (for example, use pop-up dijit/form/combobutton dijit/form/dropdownbutton, dijit/form/select) create and place the pop-up Dom structure directly sub-elements, will not be applied to your topic.

2. dijit/form/button

A button may be the most basic component on any page. It acts on user input and allows users to trigger actions, such as submitting forms or resetting values on forms.

-- Create button in declarative mode:

<!DOCTYPE html>

-- Create a button by programming:

<!DOCTYPE html>

Note: If you use the components of dojo, make sure that the script tag "parseonload: True" is added to dojo. js on the data-Dojo-config property page. In addition, if you want to parse the code, you must specify require (["dojo/parser"]).


2.1 Label attribute: String

It is used to specify a tag for a button in the tag or by programming.

2.2 showlabel attribute: Boolean

Indicates whether to display the text label value in the button part. The default value is true.

2.3 iconclass attributes: String

It is used to specify a CSS class for the associated image for the button, so that the button can become the same as the icon. Is to embed the icon into the button.

2.4 onclick (event) event

It is called when a single-host button is used.

2.5 setlabel (content) Method

Change the button tag value.



Http://www.myexception.cn/web/423404.html




This article is from the "IT technology learning and communication" blog!

Dojo learning notes (12): dojo Form Controls

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.