我试图将从我的thingspeak帐户中获取的 iframe 图表放置在页面上。
这是我需要放置的字符串(从 thingspeak 中获取):
<iframe width="450" height="260" style="border: 1px solid #cccccc;" src="http://api.thingspeak.com/channels/31592/charts/1?width=450&height=260&results=60&dynamic=true" ></iframe>
这是我在我的活动中使用的内容:
WebView webview;
webview = (WebView) findViewById(R.id.webview);
webview.getSettings().setJavaScriptEnabled(true);
webview.loadData();
我尝试着把我的iframe字符串放入"loadData"函数中,但没有成功。
感谢各位帮手;)