dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: [RESOLVED] To create html row using JavaScript

  1. #1
    Join Date
    Mar 2013
    Posts
    4

    resolved [RESOLVED] To create html row using JavaScript

    Hi,

    I am trying to create rows using for loop. Below is my coding.
    When I try on browser, nothing displayed.
    What is wrong with the code?
    Pls help.

    HTML Code:
    <table border="1">
      <tr>
        <th>Ref.1 No.</th>
    	<th>Track</th>
        <th>Title</th>
      </tr>
      <script language="text/JavaScript"> 
      for (var i=1; i<=10; i++)  
      {
    	document.write('<tr>')
    	document.write('<td>' + (100 + i) + '</td>')
    	document.write('<td> 3 </td>')
    	document.write('<td><a href="3-Management & Marketing\101.pdf" target="_blank">XXXXXXXXXXXX</a></td>')
    	document.write('</tr>')
      }
     </script>
    </table>

  2. #2
    Join Date
    Feb 2013
    Posts
    5
    Hi
    language="text/JavaScript"
    it should be type="text/JavaScript".

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