Answer the question
In order to leave comments, you need to log in
How to push values in select?
In {{::min}} and {{::max}} the minimum and maximum values are passed, I want to pass a value from min to max to the select, and build it to be something like this if min =1000 and max=5000 , then a select is built with choices 1000,1001,1002....5000, but it doesn't work, what am I doing wrong?
<div id="q1">{{::min}}</div>
<div id="q2">{{::max}}</div>
<select id="minim" ></select>
var min = $("#q1").text();
var max = $("#q2").text();
min1 = parseInt(min, 10);
max1 = parseInt(max, 10);
for (var i = min1; i < max1; i++)
{
$("#minim").push(i);
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question