JSFiddle - React, Tailwind, and code Playground

by lichangwei

HTML

<!--
    Source: http://whitewolfblog.blog.51cto.com/3973901/1075681
-->
<div id="content"></div>

JavaScript

$(function(){
  $.getJSON('http://query.yahooapis.com/v1/public/yql', {
    q: 'select * from json where url=\'http://m.weather.com.cn/data/101010100.html\'',
    format: 'json'
  }, function(data) {
    var $content = $('#content')
    if (data.query.results) {
        $content.text(JSON.stringify(data.query.results));
    } else {
        $content.text('no such code: ' + code);
    }
  });
});