📄 mod_imagemap.html
字号:
<dd>Fails with a <code>500 Server Error</code>. Valid for all
but <code>base</code>, but sort of silly for anything but
<code>default</code>.</dd>
</dl>
<h3><a name="imapfile.coords" id="imapfile.coords">Coordinates</a></h3>
<dl>
<dt><code>0,0 200,200</code></dt>
<dd>A coordinate consists of an <var>x</var> and a <var>y</var>
value separated by a comma. The coordinates are separated
from each other by whitespace. To accommodate the way Lynx
handles imagemaps, should a user select the coordinate
<code>0,0</code>, it is as if no coordinate had been
selected.</dd>
</dl>
<h3><a name="imapfile.quotedtext" id="imapfile.quotedtext">Quoted Text</a></h3>
<dl>
<dt><code>"<var>Menu Text</var>"</code></dt>
<dd><p>After the value or after the coordinates, the line
optionally may contain text within double quotes. This string
is used as the text for the link if a menu is
generated:</p>
<div class="example"><p><code>
<a href="http://foo.com/"><var>Menu text</var></a>
</code></p></div>
<p>If no quoted text is present, the name of the link will be
used as the text:</p>
<div class="example"><p><code>
<a href="http://foo.com/">http://foo.com</a>
</code></p></div>
<p>If you want to use double quotes within this text, you have to
write them as <code>&quot;</code>.</p></dd>
</dl>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="example" id="example">Example Mapfile</a></h2>
<div class="example"><p><code>
#Comments are printed in a 'formatted' or 'semiformatted' menu.<br />
#And can contain html tags. <hr><br />
base referer<br />
poly map "Could I have a menu, please?" 0,0 0,10 10,10 10,0<br />
rect .. 0,0 77,27 "the directory of the referer"<br />
circle http://www.inetnebr.com/lincoln/feedback/ 195,0 305,27<br />
rect another_file "in same directory as referer" 306,0 419,27<br />
point http://www.zyzzyva.com/ 100,100<br />
point http://www.tripod.com/ 200,200<br />
rect mailto:nate@tripod.com 100,150 200,0 "Bugs?"<br />
</code></p></div>
</div><div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="section">
<h2><a name="referencing" id="referencing">Referencing your mapfile</a></h2>
<div class="example"><h3>HTML example</h3><p><code>
<a href="/maps/imagemap1.map"><br />
<span class="indent">
<img ismap src="/images/imagemap1.gif"><br />
</span>
</a>
</code></p></div>
<div class="example"><h3>XHTML example</h3><p><code>
<a href="/maps/imagemap1.map"><br />
<span class="indent">
<img ismap="ismap" src="/images/imagemap1.gif" /><br />
</span>
</a>
</code></p></div>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ImapBase" id="ImapBase">ImapBase</a> <a name="imapbase" id="imapbase">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>Default <code>base</code> for imagemap files</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>ImapBase map|referer|<var>URL</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">默认值</a></th><td><code>ImapBase http://servername/</code></td></tr>
<tr><th><a href="directive-dict.html#Context">作用域</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">覆盖项</a></th><td>Indexes</td></tr>
<tr><th><a href="directive-dict.html#Status">状态</a></th><td>基本(B)</td></tr>
<tr><th><a href="directive-dict.html#Module">模块</a></th><td>mod_imagemap</td></tr>
</table>
<p><code class="directive">ImapBase</code> directive sets the default
<code>base</code> used in the imagemap files. Its value is
overridden by a <code>base</code> directive within the imagemap
file. If not present, the <code>base</code> defaults to
<code>http://<var>servername</var>/</code>.</p>
<h3>参见</h3>
<ul>
<li><code class="directive"><a href="../mod/core.html#usecanonicalname">UseCanonicalName</a></code></li>
</ul>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ImapDefault" id="ImapDefault">ImapDefault</a> <a name="imapdefault" id="imapdefault">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>Default action when an imagemap is called with coordinates
that are not explicitly mapped</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>ImapDefault error|nocontent|map|referer|<var>URL</var></code></td></tr>
<tr><th><a href="directive-dict.html#Default">默认值</a></th><td><code>ImapDefault nocontent</code></td></tr>
<tr><th><a href="directive-dict.html#Context">作用域</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">覆盖项</a></th><td>Indexes</td></tr>
<tr><th><a href="directive-dict.html#Status">状态</a></th><td>基本(B)</td></tr>
<tr><th><a href="directive-dict.html#Module">模块</a></th><td>mod_imagemap</td></tr>
</table>
<p><code class="directive">ImapDefault</code> directive sets the default
<code>default</code> used in the imagemap files. Its value is
overridden by a <code>default</code> directive within the
imagemap file. If not present, the <code>default</code> action
is <code>nocontent</code>, which means that a <code>204 No
Content</code> is sent to the client. In this case, the client
should continue to display the original page.</p>
</div>
<div class="top"><a href="#page-header"><img alt="top" src="../images/up.gif" /></a></div>
<div class="directive-section"><h2><a name="ImapMenu" id="ImapMenu">ImapMenu</a> <a name="imapmenu" id="imapmenu">指令</a></h2>
<table border="1" cellpadding="0" cellspacing="0" bordercolor="#AAAAAA" class="directive">
<tr><th><a href="directive-dict.html#Description">说明</a></th><td>Action if no coordinates are given when calling
an imagemap</td></tr>
<tr><th><a href="directive-dict.html#Syntax">语法</a></th><td><code>ImapMenu none|formatted|semiformatted|unformatted</code></td></tr>
<tr><th><a href="directive-dict.html#Context">作用域</a></th><td>server config, virtual host, directory, .htaccess</td></tr>
<tr><th><a href="directive-dict.html#Override">覆盖项</a></th><td>Indexes</td></tr>
<tr><th><a href="directive-dict.html#Status">状态</a></th><td>基本(B)</td></tr>
<tr><th><a href="directive-dict.html#Module">模块</a></th><td>mod_imagemap</td></tr>
</table>
<p><code class="directive">ImapMenu</code> directive determines the
action taken if an imagemap file is called without valid
coordinates.</p>
<dl>
<dt><code>none</code></dt>
<dd>If ImapMenu is <code>none</code>, no menu is generated,
and the <code>default</code> action is performed.</dd>
<dt><code>formatted</code></dt>
<dd>A <code>formatted</code> menu is the simplest menu.
Comments in the imagemap file are ignored. A level one header
is printed, then an hrule, then the links each on a separate
line. The menu has a consistent, plain look close to that of
a directory listing.</dd>
<dt><code>semiformatted</code></dt>
<dd>In the <code>semiformatted</code> menu, comments are
printed where they occur in the imagemap file. Blank lines
are turned into HTML breaks. No header or hrule is printed,
but otherwise the menu is the same as a
<code>formatted</code> menu.</dd>
<dt><code>unformatted</code></dt>
<dd>Comments are printed, blank lines are ignored. Nothing is
printed that does not appear in the imagemap file. All breaks
and headers must be included as comments in the imagemap
file. This gives you the most flexibility over the appearance
of your menus, but requires you to treat your map files as
HTML instead of plaintext.</dd>
</dl>
</div>
</div>
<div id="footer">
<p class="apache">本文允许自由使用、分发、转载,但必须保留译者署名;详见:<a href="../translator_announcement.html#announcement">译者声明</a>。</p>
<p class="menu"><a href="../mod/index.html">模块索引</a> | <a href="../mod/directives.html">指令索引</a> | <a href="../faq/index.html">常见问题</a> | <a href="../glossary.html">词汇表</a> | <a href="../sitemap.html">站点导航</a></p></div>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -