Set the name of all li under all div to "Haha", and set it to "I was clicked" when clicked. The other ones that were not clicked are still set to "Haha", divli
<1>
<! DOCTYPE html PUBLIC "-// W3C // dtd xhtml 1.0 Transitional // EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<2>
<Html xmlns = "http://www.w3.org/1999/xhtml">
How to click <a> to display the corresponding div, and hide other div
Each div defines a unique id.
Define a method to pass the parameter id for loop to show other hidden values equal to the current parameter id
Function... (id) {// obtain all the div (... div ....) {var did = .... div. id if (did = id) Current div. style. display = "" else current div. style. display = none} I don't know whether you can understand it or not...
What are the meanings of the div label li dt dd in the webpage design?
1. li usage:
Generally, li is in ul or ol and is automatically generated before the li tag in ol. It is applicable to the sequence.
Ul and ol have default padding attributes. As follows:
<Ul>
<Li> </li>
<Li> </li>
<Li> </li>
...
</Ul>
<Ol>
<Li> </li>
<Li> </li>
<Li> </li>
...
</Ol>
2. dt dd usage
It is generally used in dl labels. I used to use dt to represent the title or image dd to represent the list. As follows:
<Dl>
<Dt> here is the title </dt>
<Dd> content </dd>
</Dl>
The dl tag has the default padding attribute.
Of course, li dt dd can also be used in other tags, but it is recommended that you use it in combination.
The above only represents personal opinions and habits. Hope to help you.