HTML to JavaScript Converter Tool

The HTML to JavaScript converter tool let's you convert any HTML code to JavaScript instantly. It converts your HTML code into a series of JavaScript document.write() statements. Which can be used in a block of JavaScript.


There are 3 type of output options you have that you can use it for free are as follow :

Output as series of document.write statements
Example :

document.write("<body>");
document.write("<\/body>");

Output as document.write statements wrapped in a function
Example :

<script type="text/javascript">
function writeHTMLasJS(){
document.write("<body>");
document.write("<\/body>");
}
</script>

<!--
now place this function call at whatever point
it needs to write the markup on to the page: -->

<script type="text/javascript">
writeHTMLasJS();
</script>

Build up a string variable that you can use later
Example :

var strVar="";
strVar += "<body>";
strVar += "<\/body>";

So, if you are looking for the same and want to convert your HTML to JavaScript, here is the tool which will help you to make it done easily. [Link]

Also see : Color Code Generator for CSS


Drop Your Comments and Questions by Commenting Below :

No comments:

Post a Comment