Client-Side Image Map の簡単な例をやってみました。しかし、これは成功しませんでした。
ブラウザのみでの出力: Clicked Item:
コードは正常に見えます。しかし、まだ機能しません。なんで?
コード:
<html>
<head>
<title>Client-Side Image Map Example</title>
<script>
function update(t) {
document.form1.text1.value = t;
}
</script>
</head>
<body>
<map name="map1">
<area shape=rect coords="14,15,151,87" onClick="javascript:update('Servis');"
onMouseOver="window.status='Servise department'; return true;">
<area shape=rect coords="162, 16, 283, 85" onClick="javascript:update('Shop');"
onMouseOver="window.status='Sales department'; return true;">
<area shape=rect coords="294, 15, 388, 87" onClick="javascript:update('About as');"
onMouseOver="window.status='About as'; return true;">
<area shape=rect coords="13, 98, 79, 178" onClick="javascript:update('Email');"
onMouseOver="window.status='Write to as'; return true;">
<area shape=rect coords="92, 97, 223, 117" onClick="javascript:update('Goods');"
onMouseOver="window.status='Goods & service'; return true;">
<area shape=rect coords="235, 98, 388, 177" onClick="javascript:update('History');"
onMouseOver="window.status='History'; return true;">
<area shape=default onClick="javascript:update('No item selected.');"
onMouseOver="window.status='Please select an item.>
</map>
<h1>Client-Side Image Map Example</h1>
<hr>
The image map below uses JavaScript functions in each of its areas. Moving over
an area will display information about it in the status line. Clicking on an area
places the name of the area in the text field below the image map.
<hr>
<image src="imagemap.qif" usemap="#map1">
<hr>
<form name="form1">
<b>Clicked Item:</b>
<hr>
<input type="text" name="text1" value="Please select an item.">
</form>
<hr>
</body>
</html>
質問:
- この問題を解決するには?