- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
这是一个非常愚蠢和业余的问题,但我在我的演示网站中使用了 Telerik 的 CDN,它在除 IE 之外的任何地方都有效,我想知道为什么会这样。
我包含了所有的文件,比如
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.1.412/styles/kendo.common-material.min.css" />
<link rel="stylesheet" href="//kendo.cdn.telerik.com/2016.1.412/styles/kendo.material.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.1.412/styles/kendo.mobile.all.min.css" />
<script src="//kendo.cdn.telerik.com/2016.1.412/js/jquery.min.js"></script>
<script src="//kendo.cdn.telerik.com/2016.1.412/js/kendo.all.min.js"></script>
如您所见,我尝试像他们在他们的 dojo 示例中那样做,我也尝试添加“http://”,但文件似乎仍未在 IE 中加载,我想知道为什么会这样因为代码似乎在其他任何地方都可以完美运行,如果我给它一个本地源代码,它也可以在 IE 中运行,我只是想知道为什么 CDN 不能在 IE 中运行,我是否遗漏了一些非常基本的东西?
剩下的代码是
<%-- Main Body --%>
<form id="form1" >
<div id="grid"></div>
</form>
<%--End of Main Body --%>
<%-- Scripts --%>
<script>
var crudServiceBaseUrl = "http://localhost:50371/api";
$(document).ready(function () {
var dataSource = new kendo.data.DataSource({
change: function (e) {
if (e.action == "itemchange") {
if (e.field == "MonthsOfSalary" || e.field == "Salary") {
var item = e.items[0];
item.trigger("change", { field: "NetSalary" })
}
}
},
transport: {
read: {
url: crudServiceBaseUrl + "/CarDetails/GetCarDetails",
dataType: "json",
type: "GET"
},
update: {
url: crudServiceBaseUrl + "/CarDetails/UpdateCarDetails",
dataType: "json",
contentType: "application/json",
type: "POST",
contentType: "application/json; charset=utf-8",
data: function (data) {
return data.models;
}
},
destroy: {
url: crudServiceBaseUrl + "/CarDetails/DeleteCarDetails",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
data: function (data) {
return data.models;
}
},
create: {
url: crudServiceBaseUrl + "/CarDetails/AddCarDetails",
dataType: "json",
type: "POST",
contentType: "application/json; charset=utf-8",
data: function (data) {
return data.models;
}
},
parameterMap: function (data, operation) {
if (operation === "update" || operation === "create" || operation === "destroy") {
return JSON.stringify(data.models);
}
return data;
}
},
batch: true,
schema: {
model: {
id: "DetailId",
Total: function () {
return this.get("MonthsOfSalary") * this.get("Salary");
},
fields: {
"DetailId": { editable: false, type: "number", nullable: false, validation: { required: true } },
"CarsId": { editable: false, type: "number", nullable: false, defaultValue: 1, validation: { required: true } },
"FirstName": { type: "string", nullable: false, validation: { required: true, required: { message: "Enter a First Name" } }, defaultValue: "First" },
"LastName": { type: "string", nullable: false, validation: { required: true, required: { message: "Enter a Last Name" } }, defaultValue: "Last" },
"PhoneNumber": { type: "number", nullable: false, validation: { required: true, min: 1000000000, max: 9999999999, required: { message: "Entera ten digit number" } }, defaultValue: 1111111111 },
"Email": { type: "string", nullable: false, validation: { email: true, email: { message: "Enter Email in a@a.com Format" }, required: true, required: { message: "Enter an Email" } }, defaultValue: "e@mail.com" },
"MonthsOfSalary": { type: "number", nullable: false, validation: { required: true, min: 1, max: 48, required: { message: "Enter a number between 1 & 48" } }, defaultValue: 1 },
"Salary": { type: "number", nullable: false, validation: { required: true, min: 1, max: 10000000, required: { message: "Enter a number between 1 & 1,00,00,000" } }, defaultValue: 1 },
"NetSalary": { editable: false, type: "number", nullable: false, validation: { required: true, min: 1, max: 480000000, required: { message: "Enter a number between 1 & 48,00,00,000" } }, defaultValue: 1 },
"CarName": { editable: true, type: "string", nullable: false, validation: { required: true }, defaultValue: "Ford" },
"CarColor": { editable: false, type: "string", nullable: false, validation: { required: true }, defaultValue: "Red" },
"BirthDate": { type: "date", nullable: false, validation: { required: true, required: { message: "Enter a Date" }, min: new Date(1989, 01, 01), max: new Date(), date: { message: "Enter a Valid Date" } }, defaultValue: new Date() },
"Car": { nullable: false },
}
}
}
});
$(function () {
var cars = [];
$.get(crudServiceBaseUrl + "/Cars/GetCars", function (data, status) {
cars = data;
});
$("#grid").kendoGrid({
dataSource: dataSource,
excel: {
fileName: "Kendo UI Grid Export.xlsx",
filterable: true
},
navigatable: true,
pageable: false,
height: 550,
navigatable: true,
groupable: true,
filterable: true,
columnMenu: true,
reorderable: false,
resizable: true,
sortable: true,
toolbar: ["create", "save", "cancel", "excel"],
columns: [
{
field: "CarName", title: "Car",
editor: function (container, options) {
$('<input data-text-field="Name" data-value-field="Name" data-bind="value:' + options.field + '"/>').appendTo(container).kendoDropDownList({
dataSource: {
data: cars
},
dataValueField: "Color",
dataTextField: "Name",
autobind: true,
});
}
},
{ title: "First Name", field: "FirstName" },
{ title: "Last Name", field: "LastName" },
{ title: "Phone Number", field: "PhoneNumber" },
{ title: "Email", field: "Email" },
{ title: "Months", field: "MonthsOfSalary" },
{ title: "Salary", field: "Salary" },
{ title: "Net Salary", field: "NetSalary", template: "#=Total() #"},
{ title: "Joining Date", field: "BirthDate", format: "{0:dd MMM yyyy}" },
{
title: "Select",
template: "<input type='checkbox' />"
},
{ command: [{ name: "destroy", text: "" }] }
],
editable: {
editable: true,
confirmation: true
},
});
});
});
</script>
<%-- End of Scripts --%>
我在 <head>
中添加了链接标签和代码在 <body>
中标记,为简洁起见,我删除了一些额外的代码。
最佳答案
来自 telerik 官方网站
Kendo widgets provide a WAI-ARIA support, which means that some ARIA-specific attributes are added to the HTML element. When a widget tries to add an ARIA attribute using jQuery's attr method, which in turn calls the Element.setAttribute method, the Internet Explorer in Compatibility mode will raise a JavaScript error with the following message:
SCRIPT3: Member not found (in Internet Explorer 10+ in Compatibility Mode) The problem is reported to Microsoft on https://connect.microsoft.com/IE/feedback/details/774078. Also there is a jQuery bug report where more information can be found.
解决方案:
选项 1 - 强制 Internet Explorer 使用 Edge 模式:在 head 部分添加以下行,使浏览器使用最新版本的 Internet Explorer Edge 模式
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
选项 2 - 路径 jQuery。错误链接在这里 Bug Link
有关更多信息,请访问此处 Official Telerik
关于javascript - 为什么 Telerik cdn 在 IE 中不起作用?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/37268067/
今天有小伙伴给我留言问到,try{...}catch(){...}是什么意思?它用来干什么? 简单的说 他们是用来捕获异常的 下面我们通过一个例子来详细讲解下
我正在努力提高网站的可访问性,但我不知道如何在页脚中标记社交媒体链接列表。这些链接指向我在 facecook、twitter 等上的帐户。我不想用 role="navigation" 标记这些链接,因
说现在是 6 点,我有一个 Timer 并在 10 点安排了一个 TimerTask。之后,System DateTime 被其他服务(例如 ntp)调整为 9 点钟。我仍然希望我的 TimerTas
就目前而言,这个问题不适合我们的问答形式。我们希望答案得到事实、引用资料或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visit the
我就废话不多说了,大家还是直接看代码吧~ ? 1
Maven系列1 1.什么是Maven? Maven是一个项目管理工具,它包含了一个对象模型。一组标准集合,一个依赖管理系统。和用来运行定义在生命周期阶段中插件目标和逻辑。 核心功能 Mav
我是一名优秀的程序员,十分优秀!