YouTip LogoYouTip

Misc Jquery Htmlprefilter

# jQuery jQuery.htmlPrefilter() Method [![Image 4: jQuery Misc Methods](#)jQuery Misc Methods](#) ## Example Remove all ~~tags~~ from the incoming HTML string $(function(){var htmlPrefilter = $.htmlPrefilter, rdel = /])*?/gi; $.htmlPrefilter = function(html){return htmlPrefilter.call(this, html).replace(rdel, ""); }; var htm = 'Delete

Title

'; $('body').append($.htmlPrefilter(htm)); }); [Try it Β»](#) * * * ## Definition and Usage The $.htmlPrefilter() function modifies and filters HTML strings through jQuery manipulation methods. **Note:** 1. This method rarely needs to be called directly; instead, it can be used as an entry point to modify existing jQuery manipulation methods. * * * ## Syntax _$_.htmlPrefilter( html ) | Parameter | Description | | :--- | :--- | | _html_ | String type. The HTML string to operate on. | * * * ![Image 5: Example](#) ## More Examples (#) Any HTML string conforms to XHTML standards. Removing all tags from the incoming HTML string can also be solved this way. * * jQuery Misc Methods](#)
← Angularjs2 ArchitectureDocker Install Mysql β†’