繁体   English   中英

MustacheJS无法在IE8中呈现

[英]MustacheJS not rendering in IE8

我有一个动态模板,页面加载时会在div上追加一个动态模板,它可以在Chrome和其他一些浏览器上运行,但是在IE8中不起作用。

知道为什么它在IE8中不起作用吗?

继承人代码

var notificationDetails = {
    dangerMessage: "",
    seats: data.seatRemaining,
    class:"product-notification-danger"
};

var templates = '<div class="panel {{class}}"><button type="button" class="close" data-target="#product-notification" data-dismiss="alert"><span aria-hidden="true" style=" border: 4px solid #fff; border-radius: 50%; display: block; color: #FFFFFF; background-color: rgba(0,0,0.6); font-size: 25; width: 32px; margin-right: 5px; margin-top: 5px; ">&times;</span><span class="sr-only">Close</span> </button> <div class="notication"> <div class="notification-section"><img src="/media/13583871/ms-device.png" width="126" class="mCS_img_loaded"></div><div class="notification-section"><div class="panel-heading"> <span class="product-notification-title">Protect <span id="remaining-seats">{{seats}}</span> more devices.</span></div><div class="panel-body"> <p>{{dangerMessage}}</p><p><a href="#" style="color:#fff; font-size: 14px; text-transform: uppercase; font-weight: 700;">Learn More <span class="glyphicon glyphicon-circle-arrow-right">&nbsp;</span></a></p></div></div></div></div>'

$('#product-notification').append(Mustache.to_html(templates, notificationDetails));

它只是让脚本在我的IE8运行。

在此处输入图片说明

我会说它不再受支持了。 而且我还认为您不需要支持IE8。 还是有任何理由这样做?

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM