MS Ajax client programming learning notes (2)

Source: Internet
Author: User

Component extension:

SYS. UI. Control Base class:

Attribute Table:

Attribute Description
ID Obtains or sets the control identifier.
Element Obtain the domelement associated with the control.
Parent Obtains or sets the parent control of the control.
Visibilitymode Obtains or sets the display mode when the control is hidden. The enumerated values are as follows:
SYS. UI. visibilitymode. collapse: indicates that the control does not occupy page space when hidden.
SYS. UI. visibilitymode. Hidden: indicates that the control remains in its position when hidden.
Visible Sets or gets a bool type, indicating whether the control is visible

 

Common Methods:

Method Description
Addcssclass (classname) Add the specified CSS class to the control.
Removecssclass (classname) Removes an existing CSS class from the control.
Togglecssclass (classname) If cssclass is not specified for this control, it is added. If yes, it is removed.
Onbubbleevnet (source, argS) Process the bubble events generated by the Child control of the control.
Raisebubbleevent (source, argS) The onbubbleevent method of all parent controls of the control is triggered.

 

Enhance Dom operations

SYS. UI. domelement (37)

SYS. UI. domevent (38)

SYS. UI. bounds:

SYS. UI. Key:

SYS. UI. mousebutton:

SYS. UI. Point:

Http://www.asp.net/AJAX/Documentation/Live/ClientReference/Sys.UI/default.aspx

 

SYS. Debug: Used to output debugging information.

Http://www.asp.net/AJAX/Documentation/Live/ClientReference/Sys/DebugClass/default.aspx

 

 

As JavaScript writing grows, maintenance becomes more difficult. Therefore, it can be written to a separate JS file and then introduced to the. js file through scriptmanager.

Note: When writing a. js file, you must add the following line at the end and end of the script file:

If (typeof (sys )! = 'Undefined') SYS. application. policyscriptloaded ();

The sending method is used to notify the Ajax client when the script resource is successfully loaded to the client. When the Ajax client is running, initialization can be performed smoothly only after it receives a notification that all the scripts imported through scriptmanager have been loaded.ProgramRun.

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.