Create a message board with the drop-down function
Source: Internet
Author: User
If there are too long messages in the message board, the page will be very long. do you think it is uncomfortable for those long message boards? every time you have to pick up the scroll bars 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 it: 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, if there are too long messages in the next message board, the page will be very long. do you think that the long message board is uncomfortable? every time you have to pick up the scroll bar for 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:
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.