好的,那我做错了什么?我正在使用网站“快速入门”下的以下代码:
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="tabulator/dist/css/tabulator.css">
<script type="text/javascript" src="tabulator/dist/js/tabulator.min.js"></script>
</head>
<body>
<div id="example-table"></div>
<script>
//define some sample data
var tabledata = [
{id:1, name:"Oli Bob", age:"12", col:"red", dob:""},
{id:2, name:"Mary May", age:"1", col:"blue", dob:"14/05/1982"},
{id:3, name:"Christine Lobowski", age:"42", col:"green", dob:"22/05/1982"},
{id:4, name:"Brendon Philips", age:"125", col:"orange", dob:"01/08/1980"},
{id:5, name:"Margret Marmajuke", age:"16", col:"yellow", dob:"31/01/1999"},
];
//create Tabulator on DOM element with id "example-table"
var table = new Tabulator("#example-table", {
height:205, // set height of table (in CSS or here), this enables the Virtual DOM and improves render speed dramatically (can be any valid css height value)
data:tabledata, //assign data to table
layout:"fitColumns", //fit columns to width of table (optional)
columns:[ //Define Table Columns
{title:"Name", field:"name", width:150},
{title:"Age", field:"age", align:"left", formatter:"progress"},
{title:"Favourite Color", field:"col"},
{title:"Date Of Birth", field:"dob", sorter:"date", align:"center"},
],
rowClick:function(e, row){ //trigger an alert message when the row is clicked
alert("Row " + row.getData().id + " Clicked!!!!");
},
});
</script>
</body>
</html>
我看到的是列标题,但是-应该有数据的地方-没有任何显示!
这是我对该程序的第三次尝试。我从来没有得到它可以正常工作。我会用别的东西,但网站上的示例使我似乎可以做到所要求的。
答案 0 :(得分:0)
复制粘贴的相同代码
class ClientSocket
{
private static readonly Socket CLIENT_SOCKET = new Socket(SocketType.Stream, ProtocolType.Tcp);
public ClientSocket()
{
}
public static void Connect(IPEndPoint Endpoint)
{
CLIENT_SOCKET.Connect(Endpoint);
if (CLIENT_SOCKET.Connected)
{
Console.WriteLine("Connected to the server.");
CLIENT_SOCKET.Send(Encoding.ASCII.GetBytes("Hello World!"), SocketFlags.None);
}
}
}
答案 1 :(得分:0)
您需要使用polyfill才能使其在IE 11上正常工作。