getElementsByClassName - potatoscript/javascript GitHub Wiki

  • get all the class object
for (var s = document.getElementsByClassName("remark"), t = 0; t < s.length; t++) {
   s[t].addEventListener("keyup", remarkKeyup);
   s[t].param1 = "afasfe";
}
  • get the value of particular class object with this
   this.value
  • or use the parameter
  this.param1