使用2345的天气组件
http://tianqi.2345.com/
点击获取代码,获取源代码后 将iframe中的双引号换成单引号,添加到panel的html属性中
"<iframe allowtransparency='true' frameborder='0' width='385' height='96' scrolling='no' src='http://tianqi.2345.com/plugin/widget/index.htm?s=1&z=1&t=0&v=0&d=3&bd=0&k=&f=&q=1&e=1&a=1&c=54511&w=385&h=96&align=center'></iframe>"
我的代码如下
{ xtype: 'panel', region: 'center', html: '<iframe allowtransparency=\'true\' frameborder=\'0\' width=\'385\' height=\'96\' scrolling=\'no\' src=\'http://tianqi.2345.com/plugin/widget/index.htm?s=1&z=1&t=0&v=0&d=3&bd=0&k=&f=&q=1&e=1&a=1&c=54511&w=385&h=96&align=center\'></iframe>' }
你也可以扫描二维码加入该群