Reputation: 2553
My Javascript code is giving syntax error, I am unable to find where is the problem:
<script type="text/javascript">
function display(id,type){
alert("Hi");
}
</script>
onclick event is given below:
<map name="Map" id="Map">
<area shape="rect" coords="24,165,133,182" href="#" onclick="display("#td1","show")" />
<area shape="rect" coords="23,190,167,209" href="#" />
<area shape="rect" coords="23,218,165,235" href="#" />
<area shape="rect" coords="22,242,165,261" href="#" />
<area shape="rect" coords="23,268,164,286" href="#" />
</map>
Upvotes: -1
Views: 96
Reputation: 199
change quote to single quote
<area shape="rect" coords="24,165,133,182" href="#" onclick="javascript:display('#td1','show')" />
Upvotes: 2