browser.html
来自「perl教程」· HTML 代码 · 共 102 行
HTML
102 行
<?xml version="1.0" ?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<!-- saved from url=(0017)http://localhost/ -->
<script language="JavaScript" src="../../displayToc.js"></script>
<script language="JavaScript" src="../../tocParas.js"></script>
<script language="JavaScript" src="../../tocTab.js"></script>
<link rel="stylesheet" type="text/css" href="../../scineplex.css">
<title>ActiveState::Browser - Interface to invoke the web-browser</title>
<link rel="stylesheet" href="../../Active.css" type="text/css" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<link rev="made" href="mailto:" />
</head>
<body>
<script>writelinks('__top__',2);</script>
<h1><a>ActiveState::Browser - Interface to invoke the web-browser</a></h1>
<p><a name="__index__"></a></p>
<!-- INDEX BEGIN -->
<ul>
<li><a href="#name">NAME</a></li>
<li><a href="#synopsis">SYNOPSIS</a></li>
<li><a href="#description">DESCRIPTION</a></li>
<li><a href="#environment">ENVIRONMENT</a></li>
<li><a href="#bugs">BUGS</a></li>
</ul>
<!-- INDEX END -->
<hr />
<p>
</p>
<h1><a name="name">NAME</a></h1>
<p>ActiveState::Browser - Interface to invoke the web-browser</p>
<p>
</p>
<hr />
<h1><a name="synopsis">SYNOPSIS</a></h1>
<pre>
<span class="keyword">use</span> <span class="variable">ActiveState::Browser</span><span class="operator">;</span>
<span class="variable">ActiveState::Browser::open</span><span class="operator">(</span><span class="string">"http://www.activestate.com"</span><span class="operator">);</span>
</pre>
<p>
</p>
<hr />
<h1><a name="description">DESCRIPTION</a></h1>
<p>The ActiveState::Browser module provides an interface to make a web browser
pop up showing some URL or file. The following functions are
provided:</p>
<dl>
<dt><strong><a name="item_open">open( $url )</a></strong>
<dd>
<p>This will try to open up a web browser displaying the given URL. The
function will croak if the $url can't be resolved or if no suitable
browser could be found. The <a href="#item_can_open"><code>can_open()</code></a> test can be used to protect
against such failure, but note that such a test is not race-proof.</p>
</dd>
<dd>
<p>If the $url is absolute it is passed directly to the browser.</p>
</dd>
<dd>
<p>If the $url is relative it is looked up relative to the directory
<code>$ActiveState::Browser::HTML_DIR</code>, which defaults to the current
directory.</p>
</dd>
</li>
<dt><strong><a name="item_can_open">can_open( $url )</a></strong>
<dd>
<p>Will return TRUE if we can invoke a browser for the given URL. If the
URL is not to a local file, then this always returns TRUE, given that
a browser program was found.</p>
</dd>
</li>
</dl>
<p>
</p>
<hr />
<h1><a name="environment">ENVIRONMENT</a></h1>
<p>The AS_BROWSER environment variable can be set to override what
browser to use. The string <code>%s</code> will be replaced with the URL to
open. If no <code>%s</code> is present the string is taken as a command to invoke
with the URL as the only argument.</p>
<p>The <code>%s</code> template was inspired by the BROWSER environment variable
suggestion that appear quite dead; see
<a href="http://www.catb.org/~esr/BROWSER/">http://www.catb.org/~esr/BROWSER/</a>. Note that the AS_BROWSER is
<strong>not</strong> a colon separated list.</p>
<p>
</p>
<hr />
<h1><a name="bugs">BUGS</a></h1>
<p>none.</p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?