Hi everyone,
I am developing a webpage using only javascript.And I am dynamically creating buttons inside javascript as follows
For each button I am creating , I have to use different names.I have tried by using a javascript string variable to hold the name of the button, and using it
in the name attribue of the button .But this is not working.How can I assign different names for each button I am dynamically creating using javascript?
pls help me.
I am developing a webpage using only javascript.And I am dynamically creating buttons inside javascript as follows
Code:
document.write('<button name="" onclick="">button1</button>');
For each button I am creating , I have to use different names.I have tried by using a javascript string variable to hold the name of the button, and using it
in the name attribue of the button .But this is not working.How can I assign different names for each button I am dynamically creating using javascript?
pls help me.
Comment