Javascript 可点击美国地图绑定到多选列表框-jQuery点击事件未触发

Javascript 可点击美国地图绑定到多选列表框-jQuery点击事件未触发,javascript,imagemap,Javascript,Imagemap,地图将在子窗口和父窗口的列表框中启动。 在Javascript的click事件中,我希望能够在列表框中多选择相同的itemsStates。你能帮忙吗 <html> <head><title>Image Map</title> </head> <body> Welcome to USA Map<br><br> Click on Map to find out <br><br>

地图将在子窗口和父窗口的列表框中启动。 在Javascript的click事件中,我希望能够在列表框中多选择相同的itemsStates。你能帮忙吗

<html>
<head><title>Image Map</title>
</head>

<body>
Welcome to USA Map<br><br>
Click on Map to find out <br><br>

<script type="text/javascript">
$(function() { //run when the DOM is ready
    $("#planetmap area").click(function (e) {
    // jQuery code, event handling callbacks here
 alert();
});
});
</script>
<select id="listbox" size="5" multiple>
<option value="none">Take a pick on the map</option>
<option value="wyoming">Wyoming</option>
<option value="arizona">Arizona</option>
</select>
<img src="usaStateMap.jpg" alt="usa" usemap="#planetmap"/>
<map name="planetmap" id="planetmap">
<area id="wyoming" alt="Wyoming" title="Wyoming" href="#" shape="poly" 
coords="203,125,192,188,278,198,284,136" />
<area id="arizona" alt="Arizona" title="arizona" href="#" shape="poly" 
coords="138,258,118,330,188,361,201,269" />

</map>
</body>
</html>
我从下载了jquery.js文件 并作为参考添加。现在,单击事件适用于Imagemap区域。它可以在列表框中多选项目

<script src="jquery.js"></script>

<script type="text/javascript">
 $(function() { //run when the DOM is ready
 $("#planetmap area").click(function (e) {
 // jQuery code, event handling callbacks here
   $('#mymapselect option[value="' + this.id + '"]').attr('selected', 'selected');

 });
 });
</script>