JQuery selects the drop-down switch content and displays the Content Based on the date.

Source: Internet
Author: User
Idea: 1. obtain the year, month, and day of the current date. capture the selected status 3. the drop-down list and content can be used to summarize the communication knowledge points: 1) datesnewDate (). getDate () // get the current date 2) yearnewDate (). getFullYear () // get the current year 3) opti... syntaxHighlighter

Ideas:
1. Get the year, month, and day of the current date
2. Capture the selected status
3. drop-down and content for communication

Knowledge Point summary:
1) dates = new Date (). getDate () // obtain the current Date
2) year = new Date (). getFullYear () // obtain the current year

3) option: contains (x) // indicates to find the option containing the text containing x in the option array.
4) attr ("x", "y ")
// Adds an attribute named x and the attribute value is y.
5) val () // obtain the value of the value Attribute of the current element

6) $ ('option: selected', this) // indicates that the selected option element is selected in the current selector (this). You can use option: selected)
7) $ ("x"). each (function () {...}) // indicates that the x selector traverses from 0 until the index of the last element of the x selector.

8) show () // display
9) hide () // hide

Come from xixifeng.com

By Xi Feng (StellaAh)

[Complete example]
[Html]
 
 
 
 
JQuery selects the drop-down switch content and displays the Content Based on the date | Come from xixifeng.com 

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.