Jquery 自举不';Internet Explorer中的t渲染
我正在使用引导和 在Google Chrome中,表在普通引导容器中呈现ok,并且具有引导样式,但在Internet Explorer中,表呈现为全宽,并且没有引导样式 我使用Bootstrap已经有一段时间了,在使用它的时候,我从来没有在浏览器中看到过这些不一致的地方,所以我的代码中一定有什么东西破坏了Internet Explorer,但我不知道是什么 代码如下:Jquery 自举不';Internet Explorer中的t渲染,jquery,css,twitter-bootstrap,jquery-datatables,jquery-datatables-editor,Jquery,Css,Twitter Bootstrap,Jquery Datatables,Jquery Datatables Editor,我正在使用引导和 在Google Chrome中,表在普通引导容器中呈现ok,并且具有引导样式,但在Internet Explorer中,表呈现为全宽,并且没有引导样式 我使用Bootstrap已经有一段时间了,在使用它的时候,我从来没有在浏览器中看到过这些不一致的地方,所以我的代码中一定有什么东西破坏了Internet Explorer,但我不知道是什么 代码如下: <!doctype html> <html> <head> <
<!doctype html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Editor</title>
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/tabletools/2.2.3/css/dataTables.tableTools.css">
<link rel="stylesheet" type="text/css" href="//cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/3/dataTables.bootstrap.css">
<link rel="stylesheet" type="text/css" href="//editor.datatables.net/examples/resources/bootstrap/editor.bootstrap.css">
<script type="text/javascript" language="javascript" src="//code.jquery.com/jquery-1.11.1.min.js"></script>
<script type="text/javascript" language="javascript" src="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/1.10.4/js/jquery.dataTables.min.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/tabletools/2.2.3/js/dataTables.tableTools.min.js"></script>
<script type="text/javascript" language="javascript" src="js/dataTables.editor.min.js"></script>
<script type="text/javascript" language="javascript" src="//cdn.datatables.net/plug-ins/3cfcc339e89/integration/bootstrap/3/dataTables.bootstrap.js"></script>
<script type="text/javascript" language="javascript" src="//editor.datatables.net/examples/resources/bootstrap/editor.bootstrap.js"></script>
<script type="text/javascript" class="init">
var editor; // use a global for the submit and return data rendering in the examples
$(document).ready(function() {
editor = new $.fn.dataTable.Editor( {
ajax: "php/table.php",
table: "#table",
fields: [
{
"label": "column1",
"name": "column1",
"type": "text"
},
{
"label": "column2",
"name": "column2",
"type": "text"
},
{
"label": "column3",
"name": "column3",
"type": "text"
},
{
"label": "column4",
"name": "column4",
"type": "text"
},
{
"label": "column5",
"name": "column5",
"type": "text"
},
{
"label": "column6",
"name": "column6",
"type": "column6"
},
{
"label": "column7",
"name": "column7",
"type": "text"
},
{
"label": "column8",
"name": "column8",
"type": "text"
}
]
} );
var table = $('#table').DataTable( {
lengthChange: false,
ajax: "php/table.php",
columns: [
{
"data": "column1"
},
{
"data": "column2"
},
{
"data": "column3"
},
{
"data": "column4"
},
{
"data": "column5"
},
{
"data": "column6"
},
{
"data": "column7"
},
{
"data": "column8"
},
{
"data": "column9"
}
]
} );
var tableTools = new $.fn.dataTable.TableTools( table, {
sRowSelect: "os",
aButtons: [
{ sExtends: "editor_create", editor: editor },
{ sExtends: "editor_edit", editor: editor },
{ sExtends: "editor_remove", editor: editor }
]
} );
$( tableTools.fnContainer() ).appendTo( '#table_wrapper .col-sm-6:eq(0)' );
} );
</script>
</head>
<body>
<div class="container">
<h1>
Editor
</h1>
<table class="table table-bordered" id="table">
<thead>
<tr>
<th>Column 1</th>
<th>Column 2</th>
<th>Column 3</th>
<th>Column 4</th>
<th>Column 5</th>
<th>Column 6</th>
<th>Column 7</th>
<th>Column 8</th>
<th>Column 9</th>
</tr>
</thead>
</table>
</div>
</body>
</html>
编辑
变量编辑器;//对于示例中的提交和返回数据呈现,请使用全局
$(文档).ready(函数(){
editor=new$.fn.dataTable.editor({
ajax:“php/table.php”,
表:“#表”,
字段:[
{
“标签”:“第1列”,
“名称”:“第1列”,
“类型”:“文本”
},
{
“标签”:“第2列”,
“名称”:“第2列”,
“类型”:“文本”
},
{
“标签”:“第3列”,
“名称”:“第3列”,
“类型”:“文本”
},
{
“标签”:“第4列”,
“名称”:“第4列”,
“类型”:“文本”
},
{
“标签”:“第5列”,
“名称”:“第5列”,
“类型”:“文本”
},
{
“标签”:“第6列”,
“名称”:“第6列”,
“类型”:“第6列”
},
{
“标签”:“第7列”,
“名称”:“第7列”,
“类型”:“文本”
},
{
“标签”:“第8列”,
“名称”:“第8列”,
“类型”:“文本”
}
]
} );
变量表=$(“#表”)。数据表({
长度变化:错误,
ajax:“php/table.php”,
栏目:[
{
“数据”:“第1列”
},
{
“数据”:“第2列”
},
{
“数据”:“第3列”
},
{
“数据”:“第4列”
},
{
“数据”:“第5列”
},
{
“数据”:“第6列”
},
{
“数据”:“第7列”
},
{
“数据”:“第8列”
},
{
“数据”:“第9列”
}
]
} );
var tableTools=new$.fn.dataTable.tableTools(表{
sRowSelect:“操作系统”,
阿布顿:[
{sExtends:“editor_create”,editor:editor},
{sExtends:“editor_edit”,editor:editor},
{sExtends:“editor_remove”,editor:editor}
]
} );
$(tableTools.fncainer()).appendTo(“#table_wrapper.col-sm-6:eq(0)”;
} );
编辑
第1栏
第2栏
第3栏
第4栏
第5栏
第6栏
第7栏
第8栏
第9栏
我认为问题不在于指向引导本身的链接,而在于指向某些IE版本不支持的datatable的链接
您可以使用
class=“table stripped”设置样式
从引导程序到设置表格的样式,并添加一些javascript/JQuery来执行您需要的操作。什么版本的IE给了您这个问题?您看到任何控制台错误吗?@Izzy我在Internet Explorer 11上,我有这个问题,但早期版本也有这个问题。@DavidG console显示“附加的页面目标”文件模式7。某些控制台API和功能可能不可用。差不多就这些了。其他选项卡看起来正常。IE是否在兼容模式下运行?