标签:
var json = {}; $(‘.city-list-wrap‘).find(‘.city-list‘).each(function(){ var li = $(this); var title = li.find(‘.letter‘); title.remove(‘.arrow‘); var key = $.trim(title.text()); var values = []; li.find(‘.cities li‘).each(function() { var subLi = $(this); values.push($.trim(subLi.text())); }); json[key] = values; }); copy(json);
抓糯米网(http://www.nuomi.com/pcindex/main/changecity)数据的代码
标签:
原文地址:http://www.cnblogs.com/zhishaofei/p/4232339.html