Tuesday 15 July 2014

how do I strip html with jQuery inside a function -


I want to type a function using jquery function text () to change the html in the string < P> Trying to do this: Function FormatData (InputString) {// strip HTML var output = $ (inputstring) .text (); // ... do some other things with output return output; }

and then

  warning (formatted data ("some  b & gt; html & lt; / b & gt; stuff") ) Use   

Why does not this work?

Be sure that the string is a valid jQuery text () Before receiving, I am making a celebration because it has been asked for you, but if you do not call it many times, inline it can be done. Delete function HTML (Input) {return $ ("& lt; span & gt;" + input + "") Text (); } Was a string with the warning (Delete HTML ("I HTML; ");



No comments:

Post a Comment