//Define the columns of the table
var myColumnDefs = new Array();
for ( i=0; i < $names.length ; i++)
{
var colObjConfig = new Object();
colObjConfig.label =$names[i];
colObjConfig.resizeable =true;
colObjConfig.width =150;
myColumnDefs.push ( new YAHOO.widget.Column(colObjConfig));
}
var beginningScoreRow = "1111,1111|1111,1111";
var myDataSource = new YAHOO.util.FunctionDataSource( function () {
return beginningScoreRow ;} );
myDataSource.responseType = YAHOO.util.DataSource.TYPE_TEXT;
myDataSource.responseSchema = {
fieldDelim : ",",
recordDelim : "|"
};
var myDataTable = new YAHOO.widget.DataTable("statusTable", myColumnDefs,
myDataSource);
我想为 YUI 数据源使用 TYPE_TEXT responseType。但以上未能呈现 YUI 表格列单元格中的数据。我也没有在 JS 控制台中看到任何错误。我错过了什么?