📅  最后修改于: 2020-11-26 01:28:22             🧑  作者: Mango
jQuery wrapAll()方法用于将指定的HTML元素包装在一组匹配的元素中的所有选定元素周围。
句法:
$(selector).wrapAll(wrappingElement)
Parameter | Description |
---|---|
wrappingElement | It is a mandatory parameter. It specifies the HTML elements that you wrap around the selected elements. Its possible values are:
|
让我们以一个示例来演示jQuery wrapAll()方法。
Hello Guys!
This is javatpoint.com
The jQuery Example
Click on any square to wrap the squares into a new square:
We are going to wrap this text
ONE
TWO
THREE
一个带有打开按钮的wrapAll()示例:
Hello Guys!
This is javatpoint.com