How to use loop for on javascript and use var in loop for ?
When click button. It's will be auto fill value to input type text with loop for
But not work , How can i do that ?
http://jsfiddle.net/fNPvf/16471/
function change(){
var price_start = document.getElementById('price_start').value;
for (i = 1; i <= 14; i++) {
constance_val = i*2;
price_month_+i+ = price_start*constance_val;
document.getElementById('price_month_'+i+).value = price_month_+i+;
}
}