$(function() { var daanArray = [];

$('.xuanze').click(function(e) { $(this).toggleClass('redBorder');

var value = $(this).parent('.xuanze').find('input').val();
var daan = $(this).parent('.xuanze').find('.redBorder i.daan').text();
daanArray.push({ daan: daan, value: value });

console.log(daanArray);

$.ajax({
  type: "POST",
  url: '{:url("Dati/getAnswer")}',
  data: { daan: daanArray },
  dataType: 'json',
  success: function(msg) {
    console.log("成功");
  }
});

}); });


原文地址: https://www.cveoy.top/t/topic/o40R 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录