获取自定义标签

<span class="f-month" id = "fmonth" data-fmonth="fmonth">1</span>月

console.log($('span[data-fmonth="fmonth"]').html())

获取自定义标签

<button id ='"+arrscheId[i]+"' data-newday="+arrscheTime+" type='button' class='btn btn-primary' onclick='delRC(this)'>删除</button>

function delRC(element){

  var id = element.id;

  var day = element.getAttribute("date-newday");

  $.ajax({

    url:"",

    dataType:"json",

    type:"get",

    success:function(data){

      alert("成功")

    }

  })

}

猜你喜欢

转载自www.cnblogs.com/sjbd/p/9550192.html
今日推荐