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

📄 scroll.htm

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

<script language="javascript" src="../applet/applet.js"></script>

<body>
<a href="./index.htm">CONTENTS</a>

<h3>Scrolling the canvas.</h3>
<!-- Not compatible with Netscape 4.x ! ) -->

<p>The <a href="placing.htm#DrawCanvas">DrawingCanvas</a> applet has not built-in scroll capabilities
however you can use HTML tag <b>&lt;div&gt;</b> with the style property <b>overflow</b> for scrolling.</p>

<p>Example:</p>

<div style="overflow:auto;width:400;height:300;" >
<script language="javascript"><!--
  // We use JavaScript to output the applet tag
  // due to the IE security issue descibed here:
  // http://izhuk.com/docs/ie7fix.html

  var painter = new Applet();
  painter.attr['archive']  = 'painter.jar';
  painter.attr['codebase'] = '../applet';

  painter.attr['code']   = 'DrawCanvas.class';
  painter.attr['width']  = 640;
  painter.attr['height'] = 480;
  painter.attr['name'] = 'canvas';
  
  painter.write();
//--></script>
</div>

<p>Corresponding DHTML code</p>

<pre>
<b>&lt;div style="overflow:auto;width:400;height:300;"&gt;</b>
    &lt;applet width="640" height="480" code="DrawCanvas.class"
	codebase="../applet" archive="painter.jar" name="canvas" &gt;
    &lt;/applet&gt;
<b>&lt;/div&gt;</b>
</pre>

</body>
</html>

⌨️ 快捷键说明

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