This method is used to replace all matching elements with the specified HTML or DOM elements
Content (String, Element, JQuery, Function)
The content that is used to replace the matching element. If a function is passed in here, the function return value must be an HTML string.
Fn
Returns the THML string that is used to replace the content.
Instance:
;} Html{font:15px/1.2em ' Courier New '; color: #666; width:750px;margin:25px auto;} ul{list-Style:none;} . Hover{color: #FF96EC;} . Wrapall{color: #FF96EC;}</style><script type= ' Text/javascript ' > $(function(){ //$ ('. List '). ReplaceWith (Document.createelement ("div"));$ ('. List '). ReplaceWith ($ ('. Wrap '));//This substitution method belongs to the move substitution, which is not part of copy substitution
$ ('. Wrap '). ReplaceAll ($ ('. List '));
});</script> Thisis unwrap test</p> </div> </div> <p class= ' list ' > Thisis unwrap test</p> </div></body>
[jquery document Processing replacewith (CONTENT|FN) replaceall (content)] This method is used to replace all matching elements with the specified HTML or DOM elements