I have the following as the code but i when i debug it from the chrome. I have seen that the id names are all +someInput +demo things like that. My aim is to pass the javascript variables to the ids. How can i do that? Thanks in advance.
for(i=0;i<5;i++){
var demo5 = "demo5"+i;
var someInput ="someInput" +i;
var demo = "demo"+i;
var demo1 = "demo1"+i;
var demo2 = "demo2"+i;
var demo3 = "demo3"+i;
var demo4 = "demo4"+i;
document.write('<tr>');
document.write('<td><p id=""+demo5 ></p></td>');
document.write('<td><p id=""+someInput onclick="myFunction(),myFunction5()"></p> </td>');
document.write('<td><p id=""+demo onclick="myFunction1(),myFunction5()"></p></td>');
document.write('<td><p id=""+demo1 onclick="myFunction2(),myFunction5()"></p></td>');
document.write('<td><p id=""+demo2 onclick="myFunction3(),myFunction5()"></p></td>');
document.write('<td><p id=""+demo3 onclick="myFunction4(),myFunction5()"></p></td>');
document.write('<td><p id=""+demo4 </p></td>');
document.write('</tr>');}
document.writewrites to the document everything passed in the argument, literally.