Hi Guys,
I'm having problem with the Javascript.
Does anyone knows how to convert from Javascript to html?
Like this code:
<script type="text/javascript" src=" xxxx ="></script>
Your help will be highly appreciated.
Hi Guys,
I'm having problem with the Javascript.
Does anyone knows how to convert from Javascript to html?
Like this code:
<script type="text/javascript" src=" xxxx ="></script>
Your help will be highly appreciated.
Do you want
HTML
<script type="text/javascript" src=" xxxx ="></script>
You may use this:
<html>
<head><title>JavaScript to HTML</title>
<script type="text/javascript">
function encode(){
var s = document.getElementById('source');
var txt = s.value;
txt = txt.replace(/[&]/g,'&');
txt = txt.replace(/[<]/g,'<');
txt = txt.replace(/[>]/g,'>');
s.value = txt;
}
</script>
</head>
<body>
<button onclick="encode()">Convert to HTML</button><br />
<textarea id="source" style="width:90%;height:400px"></textarea>
</body></html>
You can save the above mentioned code in js2html.html and open it your browser. After that paste your code which you want to get converted and hit on covert. It will be done.
Bookmarks