Set the name of all li in all the divs to & quot; Haha & quot;, and set it to & quot; when clicked. I was clicked & quot ;, the remaining ones are still set as "Haha" and divli

Source: Internet
Author: User

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.

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.