Example sharing JQuery selector and DOM node operation exercises

小云云
Release: 2017-12-27 10:17:24
Original
1893 people have browsed it

This article mainly brings you an example of JQuery selector and DOM node operation exercises. The editor thinks it’s pretty good, so I’ll share it with you now and give it as a reference. Let’s follow the editor to take a look, I hope it can help everyone.

1. Exercise 1

1. Demand effect analysis:

2. Code example:

       
  

隔壁 Java 老师 很肥

隔壁Java 老师 很胖

隔壁Java 老师 很呆萌

隔壁Java 老师 爱捡肥皂

隔壁Java 老师 爱撒娇

隔壁Java 老师 装嫩

隔壁Java 老师 肾虚

隔壁Java 老师 等等

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

隔壁Java 老师 很肥

Copy after login

2 , Exercise 2

1. Effect analysis:

2. Code example

        
  
  • 中国

    台湾

    钓鱼岛

    北京

  • 米国

    华盛顿

    洛杉矶

  • 韩国

    首尔

    釜山

    济州岛

Copy after login

3. Exercise 3

1. Effect analysis

2. Code example

        
  

点击我让所有id为mybox的元素边框该为:5px dotted green=》提示 $().css("border","5px dotted green")

点击我让所有class=red的元素边框该为:5px dotted green

点击我让所有p的元素边框该为:5px dotted green

点击我让id为mybox的元素、p元素边框该为:5px solid green

点击我隐藏除了我以外所有的兄弟元素

我是段落...

Copy after login

Related recommendations

JQuery selector

Detailed explanation of jQuery selector (prev ~ siblings)

Some details in jQuery selector

The above is the detailed content of Example sharing JQuery selector and DOM node operation exercises. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!