SEO Software
Closed Thread
Results 1 to 3 of 3

Thread: Javascript to Html

  1. #1

    Default Javascript to Html

    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.


  2. Micro Niche Builder

  3. #2

    Default

    Do you want
    HTML
    &lt;script type=&quot;text/javascript&quot; src=&quot; xxxx =&quot;&gt;&lt;/script&gt;

  4. #3

    Default

    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,'&amp;');
    txt = txt.replace(/[<]/g,'&lt;');
    txt = txt.replace(/[>]/g,'&gt;');
    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.

Closed Thread

Similar Threads

  1. Javascript
    By Avss in forum Design and Development
    Replies: 1
    Last Post: 05-26-2009, 03:20 AM
  2. JavaScript
    By amr302020 in forum Design and Development
    Replies: 1
    Last Post: 12-28-2007, 02:39 PM
  3. Javascript/Html/php question
    By kamustra in forum Design and Development
    Replies: 6
    Last Post: 06-29-2006, 02:03 PM
  4. Looking For HTML and Javascript resources
    By webbug in forum Design and Development
    Replies: 6
    Last Post: 06-12-2006, 01:07 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts