10-20-2006, 11:07 AM
10-20-2006, 05:06 PM
it depends wot u r trying to convert perhaps you could show your code and explain wot u r wanting to do with each bit of it.
11-05-2006, 05:34 AM
I get a code <script> </script> and I need to convert that into an <a href> or <iframe>. I am hoping you would be able to help me with this. :)
11-05-2006, 05:59 AM
Save this as js2html.html
var s = document.getElementById('source');
var txt = s.value;
txt = txt.replace(/[&]/g,'&');
txt = txt.replace(/[<]/g,'<');
txt = txt.replace(/[>]/g,'>');
s.value = txt;
<button onclick="encode()">Convert to HTML</button><br />
<textarea id="source" style="width:90%;height:400px"></textarea>
Open js2html.html with your web browser.
Click the convert button ONLY ONCE.
copy and paste the result into the blog.
You may desire to place the output between <pre> and </pre> tags in order to preserve the formatting of the code.
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.