html pre tag, extract text only?

Bni

New member
Is there anyway to extract text of a pre element using JavaScript?

example:
<pre>
<span style="color:red">red</span>
<span style="color:blue">blue</span>
</pre>

convert to:
redblue
 
Back
Top