Home  >  Article  >  Backend Development  >  Make a message board with drop-down function_PHP tutorial

Make a message board with drop-down function_PHP tutorial

WBOY
WBOYOriginal
2016-07-21 16:05:08852browse

If there are too long messages in the message board, it will make the page very long. Do you think those very long message boards are uncomfortable to read, and you have to click the scroll bar many times every time.
If only the title appears at the beginning each time, click on the title and the content will appear below (note that it is not a pop-up window). Wouldn’t this be great!
Next let’s see how to implement it:
First, set an ID for each title and content. This is the ID setting for the first message. We set the ID of the title to td1 and the content to tdd1. Then The same goes down.
 
 Here is the title



Here is the content


Close

< ;/TD>


"onclick=goit(tdd1) onmouseout=noit(td1) onmouseover=onit(td1)"
These three sentences are the mouse event, noit () and onit() just change the color, goit() is the function to open or close the content, the specific function is as follows:



Finally, don’t forget to initialize your page by hiding the content first”

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/315742.htmlTechArticleIf there are too long messages in the message board, it will make the page very long. Everyone is concerned about those very long messages. Do you find the message board uncomfortable to read? You have to click the scroll bar many times every time. If every time...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn