⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 loading.htm

📁 applet在線上繪圖,允許在瀏覽器上繪圖,最後儲存成各式的圖檔
💻 HTM
字号:
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <title>Loading image from your server</title>
<link REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style">
</head>
<body>
<a href="./index.htm">CONTENTS</a>

<h3>Loading image from your server</h3>
<p>The editor supports two different methods of image loading.</p>

<h4><a NAME="link"></a>Method 1 - Load via a link</h4>
<p>You can set the parameter "load" for <a href="placing.htm#DrawCanvas">DrawCanvas</a> applet,
for example:</p>

<pre>&lt;param name="load" value="images/myimage.png"&gt;</pre>

The value of the parameter must be a URL of a PNG, JPEG, GIF, or BMP image located at your server.<br>
The URL may be either absolute or relative to the current HTML document.

<h4><a NAME="embed"></a>Method 2 - Embed in HTML</h4>
You can embed the image data directly into the editor's web page. For that you have to define
the parameter "image" for the <a href="placing.htm#DrawCanvas">DrawCanvas</a>,
for example:

<pre>&lt;param name="image" value="iVBORw0KGgoAAAAN...lFTkSuQmCC"&gt;</pre>

<p>The value of the parameter must be PNG or JPEG or GIF or BMP file encoded by <a href="base64.htm">BASE64</a> method.
<br>For example, you can pass the data saved by the methods
<a href="saving.htm#javascript">HTML form + JavaScript</a> or <a href="saving.htm#post">POST with BASE64</a>.</p>

<p><br><a NAME="imagecache"></a><b>Image caching.</b></p>
<p>When the user goes to another web page (whether at your website or not) and then comes back,
all the drawing changes are destroyed. You can avoid such behaviour by activating the editor's caching mechanism.
To turn on the caching you have to use the DrawCanvas parameter <b>pageid</b>.</p>

<pre>&lt;param name="pageid" value"... any string ..."&gt;</pre>

<p><b>pageid</b> value should be any character string unique for every page loading.</p>

A couple of notes on image caching:
<ul>
<li>If the value of "pageid" is static (i.e. hard encoded in HTML), the user won't be able to reload a new image
from your server (i.e. override the cache) until he/she closes all the browser's windows.
Thus the <b>pageid</b> value should be prepared by the server side script.
To generate unique values you can use, for example, the current date-time.</li>

<li>Avoid using caching in case you process big image files or use many instances of the applet on your website.
Cached images consume additional memory.</li>
<ul>

</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -