Laravel,如何从js获取变量?

时间:2017-12-21 08:52:58

标签: javascript php

视图

Deadline: <span class = "deadline">this will replace a new date</span>

JS

$.each(items, function (index, value) {
        talent = new TalentListMasonry({
          deadline: value.timeline,
          url: value.talent_url,
          isUrgent: value.is_urgent == 1
        });
        var final = talent.make();
        lll.append(final).isotope('insert', final);
      });

我的问题是,我如何检查日期是否等于2017-12-30?

我的想法是这样的,

@if(deadline == 2017-12-30)
  <h1>Success</h1>
@endif

0 个答案:

没有答案