Collection of js-related small code

Source: Internet
Author: User

This article will serve as a record of future js knowledge.
1. The datepicker plug-in is used during development and the following two methods are used:
[Html]
$ ('# Date'). datePicker ({
ClickInput: true,
StartDate: new Date (1900,1, 1). asString ()
});
It is used to set whether the input box can enter and set the start time of the text box.
2.
[Html]
$ ("# Date"). dpSetDisabled (true );
Used to disable datepicker.
3.
[Html]
$. Ajax ({
Type: "POST ",
Url: "ajax. do ",
Data :"",
Success: function (msg ){
Certificate ('{result'}.html (msg );
}
});
This section can be used for ajax requests. type indicates the request type (GET, POST), url indicates the Request Path, and data indicates the request parameters or data carried, success indicates the method by which the request is successfully executed. Msg indicates the data returned when the request is successful.

From executing dream code

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.