fmpq.com
源代码:
点击运行
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Fmpq教程(fmpq.com)</title> <script src="http://www.fmpq.com/jscss/jquery/2.2.0/jquery.min.js"></script> </head> <body> <script> $(function() { var htmlPrefilter = $.htmlPrefilter, rdel = /<(del)(?=[\s>])[\w\W]*?<\/\1\s*>/gi; $.htmlPrefilter = function( html ) { return htmlPrefilter.call( this, html ).replace( rdel, "" ); }; var htm = '<del>删除</del><h1>标题</h2>'; $('body').append($.htmlPrefilter(htm)); }); </script> </body> </html>
运行结果