<script type="text/javascript">
var temp=document.getElementById("col").value;
var temp2=temp.split("%");
for(i=0;i<col.length;i++) {
val = temp2[0]+temp2[1]+temp2[2];
/* ... */
}
</script>
I have the above code, instead of
val = temp2[0]+temp2[1]+temp2[2];
Could it be possible to store all array values into val variable? I mean a generic way of adding values to val instead of specifying array position?
Thanks
%, then usevar val = temp.replace(/%/g, '').