I have 300 functions with name cloud1=cloud300 that are called onclick on 300 buttons(names of buttons – button1-button300) to change class of 300 textboxes with name tree1-tree300.How can I do this using for loop.
function cloud1(){document.formname.tree1.className="css"}
function cloud2(){document.formname.tree2.className="css"}
function cloud3(){document.formname.tree3.className="css"}
Just pass input name as parameter to