create an associative array in jquery

前端 未结 5 1787
迷失自我
迷失自我 2021-01-01 23:43

This is what I have so far and the shoe types are boots, wellingtons, leather, trainers (in that order)

I want to iterate through and assign th

5条回答
  •  [愿得一人]
    2021-01-02 00:08

    if $(this).attr('id') is the type of shoes you can try that

    shoeArray[$(this).attr('id')] = parseInt($(this).val());
    

提交回复
热议问题