我希望动态添加area
到map
。所以我做了
....
var area = '<area href="#" shape="poly" coords="'+coors4+'" id="area4">';
alert(area);
$('#number_areas').append(area);
$('[id*="area"]').mapster('select');
.....
<map name="number_areas" id="number_areas">
</map>
所以在提醒时我得到<area href="#" shape="poly" coords="477,1,572,1,572,96,477,96" id="area4">
但map
标记仍为空