<img src="/img/eg_planets.jpg" border="0" usemap="#myMap" alt="Planets" />
<p>点击按钮来创建 IMAGE-MAP 以及链接到 "venus.htm" 的 AREA 元素:</p>
<button onclick="myFunction()">试一下</button>
var x = document.createElement("MAP");
x.setAttribute("id", "myMap");
x.setAttribute("name", "myMap");
document.body.appendChild(x);
var y = document.createElement("AREA");
y.setAttribute("href", "/example/html/venus.html");
y.setAttribute("shape", "circle");
y.setAttribute("coords", "180,139,14");
document.getElementById("myMap").appendChild(y);
document.getElementById("demo").innerHTML = "已创建 MAP,现在您可以在图像中点击 venus 区域。";