www.webdeveloper.com
Results 1 to 2 of 2

Thread: How to replace the HTML tags.

  1. #1
    Join Date
    Apr 2006
    Posts
    219

    How to replace the HTML tags.

    Hi all,

    I have the following Javascript code to write a code to the page using InnerHTML. But instead of writing the code, it shows the content of the iframe. How can I make the code write straight text of the HTML code

    Thanks

    Code:
    <script type="text/javascript">
    function changeContent(cont1){
    var x=document.getElementById('myTable').rows
    var y=x[1].cells
    y[0].innerHTML="<iframe src='/poll/poll.asp?pollID=" + cont1 + "' frameborder=0 scrolling=no name=main id=main height=150 width=230></iframe>"
    }
    </script>

  2. #2
    Join Date
    Dec 2005
    Location
    FL
    Posts
    7,355
    document.getElementById('divSection').innerHTML = 'write text directly to divSection';

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles