Google Charts javascript中的语法错误?

时间:2012-04-24 13:33:44

标签: javascript syntax google-visualization

请有人看看这个JS,我正在尝试创建一个谷歌图表。我已经完成了这本书的所有内容,但它仍然不想运行。我快要失去理智了!它不像是很多代码,而且我经历了无数个字符。

<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
    var SmsSearchResults, SmsSearchResults; 
    google.load('visualization', '1', {packages:['table']}) 
     google.setOnLoadCallback(drawTable); 
     function drawTable() { 
     SmsSearchResults = new google.visualization.DataTable();  
    SmsSearchResults.addColumn('string','number')  
    SmsSearchResults.addColumn('string','deliveryStatusDescription')  
    SmsSearchResults.addColumn('string','sendAttempts')  
    SmsSearchResults.addRows(3)  
    SmsSearchResults.setCell(0,0,'0824178777')  
    SmsSearchResults.setCell(0,1,'Delivered')  
    SmsSearchResults.setCell(0,2,'1')  
    SmsSearchResults.setCell(1,0,'0824178777')  
    SmsSearchResults.setCell(1,1,'Delivered')  
    SmsSearchResults.setCell(1,2,'1')  
    SmsSearchResults.setCell(2,0,'0716036940')  
    SmsSearchResults.setCell(2,1,'Delivered')  
    SmsSearchResults.setCell(2,2,'1')  
    SmsSearchResults = new google.visualization.Table(document.getElementById('searchResultsTable')); 
     var view = new google.visualization.DataView(SmsSearchResults);  

      SmsSearchResults.draw(view, {showRowNumber: true, allowHtml:false}); 
      google.visualization.events.addListener(SmsSearchResults, 'select', ManualAllocSelectionHandler); 
      }  
</script>
</head>

<body>
<div id='searchResultsTable'></div>
</body>
</html>

老实说,我不知道还有什么可做的...... 谢谢!

0 个答案:

没有答案