Latest web development tutorials

Metodo jQuery jQuery.htmlPrefilter ()

jQuery Metodi Varie jQuery Metodi Varie

Esempi

Elimina tutto dalla stringa HTML in entrata etichetta

$ (Function () { var htmlPrefilter = $ htmlPrefilter, rdel = / <(del) (= [? \ s> [\ w \ W] * <\ / \ 1 \ s *> / gi.]);?. $ htmlPrefilter = function ( html ) { ritorno htmlPrefilter. chiamata ( questo, html ). Sostituire ( rdel, "" );}; Var htm = '<del> cancellato </ del> <h1> voce </ h2>'; $ ( 'body') append ($ htmlPrefilter (htm).) ;.});

Prova »

Definizione e utilizzo

$ .htmlPrefilter () Per modificare e archi filtro HTML con i metodi di jQuery di funzionamento.


Note: 1. Questo metodo raramente bisogno di chiamare, ma è possibile utilizzare questo metodo come metodo di modifica di un jQuery esistente che opera un punto di ingresso.


grammatica

$.htmlPrefilter( html )

参数 描述
html String类型 在该HTML字符串上进行操作


Esempi

Altri esempi

Garantire che qualsiasi XHTML stringa HTML compatibile
Qualsiasi stringa HTML XHTML, rimuovere tutte le <del> tag può anche essere risolto dalla stringa HTML in entrata.


jQuery Metodi Varie jQuery Metodi Varie