我有一些代码,它在堆栈代码段上运行得很好。
但是,当我将它插入到我的服务器上或仅仅在.html文件中时,刷新按钮就会变小!

<link href="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/css/bootstrap.css" rel="stylesheet"/>
<link href="http://cdnjs.cloudflare.com/ajax/libs/jquery-bootgrid/1.1.4/jquery.bootgrid.css" rel="stylesheet"/>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery-bootgrid/1.1.4/jquery.bootgrid.js"></script>
<script>
$(function () {
var testGrid = $("#testGrid").bootgrid({
navigation: 3,
ajax: true,
url: "controllers/getListFiles",
post: function () {
return {
type: 'req',
expanded: $('#exp').text()
};
},
responseHandler: function (response)
{
return response.data;
}
});
});
</script>
<div id="autoOut" class="tab-pane fade in active">
<span id="exp" style="display: none;"></span>
<h3>Auto OUT</h3>
<table id="testGrid" class="table table-condensed table-hover table-striped">
<thead>
<tr>
<th data-column-id="date" class="col-md-3">Дата/Время</th>
<th data-column-id="expander" data-formatter="expander" class="col-md-1">Список</th>
<th data-column-id="file" class="col-md-4">Имя файла</th>
<th data-column-id="uid" class="col-md-4">UID</th>
<th data-column-id="accReqId" class="col-md-2">AccountsRequestId</th>
</tr>
</thead>
</table>
</div>有复制和粘贴的代码,没有不同的!是否有一些片段羽毛使它工作,我如何使它在我的服务器上工作?更多关于我以前的question的信息。
发布于 2015-05-08 15:21:26
在将代码移动到自己的html文件时,请确保指定了doctype。堆栈片段和JS自动将HTML5文档类型的<!DOCTYPE html>添加到它们的输出中(尽管在JS的情况下这是可配置的)。不提供doctype会导致奇怪的结果,因为浏览器不知道使用什么呈现模式。
采自http://www.w3.org/QA/Tips/Doctype 的
但最重要的是,在大多数浏览器家族中,一个doctype声明将使许多猜测变得不必要,从而触发“标准”呈现模式。
https://stackoverflow.com/questions/30126886
复制相似问题