包含 Kendo detailTemplate 的页面无法加载 Chrome

Page with Kendo detailTemplate can not load with Chrome

在页面(部分视图)上,我有一个带有 detailTemplate 的 kendo 网格。

$('#myGrid').kendo网格({

detailTemplate: kendo.template($("#template").html()),

我的模板是这样的

        <div id="template">
            <table style="background-color:#EE00EE">
                <tr>

使用 IE,页面加载正确,但使用 Chrome 或 FF 时不正确。
如果我取下 style="background-color:#EE00EE" ,那么就可以了。 感谢您的帮助。

它被识别为 kendo 模板,在 kendo 模板中,您正在使用 # 标签访问 js 变量,因为 kendo 正在尝试读取名称为 EE00EE 的变量不存在。您需要像这样转义 # 标签:\#EE00EE 或使用标准颜色或使用 rbg 过滤器。

示例:escape # tag in template