Hello People here is my code,
function send()
{
var param_count=document.getElementsByName('eqt_param[]');
for (var i=0; i<param_count.length; i++)
{
var test=param_count[i].value;
var param_value='Eqt_Param'+i+'='+test;
alert(param_value);
}
}
if i alert i get "Eqt_Param0=4.00" then "Eqt_Param1=3.00" but i want to alert at once output should be something like "Eqt_Param0=4.00,Eqt_Param1=3.00 " after alerting this way i also want to remove the ',' in between how to fix this?
Do you mean this:
function send()
{
var param_count=document.getElementsByName('eqt_param[]');
var values = [];
for (var i=0; i<param_count.length; i++)
{
values.push('Eqt_Param'+i+'='+param_count[i].value)
}
alert(values.join(', '));
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With