4
webView.getSettings().setJavaScriptEnabled(true);
webView的加載這個HTML代碼:不能設置爲空的特性 '溢出'
<html>
<head>
<script type='text/javascript' src='https://www.google.com/jsapi'></script>
<script type='text/javascript'>
google.load('visualization', '1', {packages: ['corechart']});
google.setOnLoadCallback(drawChart);
function drawChart() {
var data = google.visualization.arrayToDataTable([
['Year', 'Sales', 'Expenses'],
['2004', 1000, 400],
['2005', 1170, 460],
['2006', 660, 1120],
['2007', 1030, 540]
]);
var options = {title: 'Company Performance'};
var chart = new google.visualization.LineChart(document.getElementById('chart_div'));
chart.draw(data, options);
}
</script>
</head>
<body>
<div id='chart_div' style='width: 900px; height: 500px;'></div>
</body>
</html>
它的代碼從谷歌的例子Visualization: Line Chart
web視圖顯示文本cannot set property 'overflow' of null
如何解決?
我把簡單的java測試代碼的一行html代碼,任何方式,謝謝 – Sunshine 2013-03-04 08:13:37
你能否澄清Android /瀏覽器版本,所以你的文章會更有用的其他讀者? – Philzen 2013-03-04 08:33:03