//获取id为div下,span标签中data-count属性为district的值
var site1 = $("#div span[data-count^='district']").text();
//获取id为div下,span标签中data-count属性为district的元素下,data-code属性值
var site2 = $("#div span[data-count^='district']").attr("data-code");
//获取id为div下,span标签中data-count属性为district的值
var site1 = $("#div span[data-count^='district']").text();
//获取id为div下,span标签中data-count属性为district的元素下,data-code属性值
var site2 = $("#div span[data-count^='district']").attr("data-code");