云图|云图 jQCloud

var data = https://www.it610.com/article/[ ['北京', 8, 111], ['台湾', 1, 111] ]; var string_ = ""; function SplitKeyWord() { for (var i = 0; i < data.length; i++) { var string_f = data[i][0]; var string_n = data[i][1]; string_ += "{text: '" + string_f + "', weight: '" + string_n + "',html: {'class': 'span_list',onmouseover:'on_mouseover(this,event)',onmouseout:'on_mouseout()',onclick:'ClickGJC(this)'}},"; } } function on_mouseover(e, ev) { var txt = $(e).html(); ev = ev || event; ey = ev.clientY + 320; //alert(ey); $.each(data, function (i, item) { if (txt == item[0]) { var html = item[0] + "
点击数
" + item[1] + "
" + item[1]; $("#my_favorite_latin_words").after("" + html + ""); return; }}); } function ShowKeyWords() { data = https://www.it610.com/article/keywordsdata; SplitKeyWord(); var string_list = string_; var word_list = eval("[" + string_list + "]"); $("#my_favorite_latin_words").jQCloud(word_list); }function on_mouseout() { $(".append_div").remove(); }

【云图|云图 jQCloud】 jqcloud-1.0.4.js


$.ajax({ type: 'POST', url: "/Home/SearchYuntu", data: { //tempdata: $(".list_sea").text() }, success: function (data) { var jsonData = https://www.it610.com/article/JSON.parse(data) if (jsonData != null) { if (jsonData.length> 0) { for (var i = 0; i < jsonData.length; i++) { keywordsdata.push(new Array(jsonData[i].ID, jsonData[i].UsingCount, jsonData[i].DisplayIndex)); } } } ShowKeyWords(); } });


转载于:https://www.cnblogs.com/caolingyi/p/8548449.html

    推荐阅读