Create a message board with the drop-down function

Source: Internet
Author: User
If there are too long messages in the message board with the pull-down function, the page will be very long. do you think it is uncomfortable for those long message boards, each time, the scroll bar is highlighted many times.
If only the title appears at the beginning, you can click the title to see the content below (note that it is not a pop-up window). Is this good!
Next, let's take a look at how to implement:
First, set the ID of each title and content. this is the ID of the first message. we set the title ID to td1 and the content to tdd1.

Here is the title



Here is the content

Close




"Onclick = goit (tdd1) onmouseout = noit (td1) onmouseover = onit (td1 )"
The three sentences are the mouse event. noit () and onit () only change the color. goit () is the function to open or close the content. the specific function is as follows:

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.