Skip to content Skip to sidebar Skip to footer

Convert Html Tag To Lowercase

I working on an intranet project for IE6 (i know...) and I need to output some HTML code from a div. I use $('#output').text($('#container').html()); But IE6 outputs all the code i

Solution 1:

Try

$('#output').text($('#container').html().replace(/<\/?[A-Z]+.*?>/g, function (m) { return m.toLowerCase(); }));

Solution 2:

What if you use .html() instead of .text()?

Post a Comment for "Convert Html Tag To Lowercase"