What is the jQuery equivalent to this getElementsByName?
So what would be the jQuery equivalent to this standard getElementsByName set of code?
- for (var index=0; index<document.getElementsByName("amount1").length; index++)
- {
total = total + document.getElementsByName("amount1")[index].value * document.getElementsByName("amount2")[index].value;
}
-
document.getElementById("totalAmount").innerHTML=total;