contents
English['k?ntents]
n. ??(?, ??, ???? ?) ??(? ?); ) ??, ????, ??(?, ??, ???? ?)
jquery ??() ??? ???
??: contents() ???? ??? ? ?? ??? ???? ???? ?? ???? ?? ? ??? ?? ??? ?????.
??: ??.contents()
??: DOM ?? ??? ???? jQuery ??? ?? ?? .contents() ???? ???? DOM ???? ??? ??? ?? ?? ??? ???? ??? ? ????. ???? ??? ?? ??? jQuery ??. .contents() ? .children() ???? ?? jQuery ??? ??? ??? HTML ??? ????? ?? ???? ?????. iframe? ?? ???? ??? ???? ?? ?? .contents() ???? ???? iframe? ??? ??? ??? ?? ????.
jquery ??() ??? ?
<!DOCTYPE html> <html> <head> <script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.1/jquery.min.js"></script> </head> <body> <p>Hello <a href="http://php.cn/">Apple</a>, how are you doing?</p> <script>$("p").contents().filter(function(){ return this.nodeType != 1; }).wrap("<b/>");</script> </body> </html>
??? ????? ??? "???? ??" ??? ?????