i want to call function when i click dynamic label in js file my code sample is here! var output='<form><table><tr>'; for(var i=1;i<=page;i++){ //var pgno=String(i); output+='<td><label id=\"'+i+'\"/ onclick=\"Display();\">'+i+'</td>'; } output+='</tr></table></form>'; document.write(output); function display(){ document.write("hello"); } but onclick event doesn't work.how can i call onclick event .
yes.i change this syntax error but it does not active this onclick event.how can i do?please help me.