每个列表都有两个基于jquery上的输入值(2)的输入值

时间:2019-04-06 08:15:41

标签: javascript jquery html css

例如:如果每个li有2种颜色,则每个列表的追加图像url为2。图片来自输入值4,6 ....

for(i = 0; i < selectproductCOLOR.length; ++i) { 
          $('.leftsectn_iconlist ul li').each(function () { 
  $(this).append("<input class='databg123' type='hidden' data-url="+ selectproductURL[i] +">");
});

      }

<input class="selectproduct_color" type="hidden" value="#FFFF00,#008000"> <input class="selectproduct_url" type="hidden" value="http://localhost/expressstickerei/wp-content/plugins/express-stickerei/assets/product_img/print_area/31/Top Left/cover-right1.png,http://localhost/expressstickerei/wp-content/plugins/express-stickerei/assets/product_img/print_area/31/Top Left/cover-right2.png,http://localhost/expressstickerei/wp-content/plugins/express-stickerei/assets/product_img/print_area/31/Front/pillow7.png,http://localhost/expressstickerei/wp-content/plugins/express-stickerei/assets/product_img/print_area/31/Front/pillow12.png">

<li><input type="hidden" value="xx.png,yy.png></li> <li><input type="hidden" value="xx1.png,yy1.png></li>

0 个答案:

没有答案