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

📄 actions.html

📁 用于一医院的电子病历系统. JAVA开发。很有参考价值。
💻 HTML
字号:
<html xmlns="http://www.w3.org/1999/xhtml">  <head>    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />    <title>dhtml menu javascript menu</title>    <link rel="stylesheet" href="../code.css" />  </head>  <body onload="window.parent.sectionLoaded(document.body)"><div style="font-size: 1px; line-height: 1px"><br /></div><h1>Action handlers</h1><!-- -*- nxml -*- --><p>  Albeit very flexible, writing an &lt;a&gt; tag inside every item can  sometimes become a pain.  For items that open URL-s, writing normal  link tags makes sense, because they ought to work in any browser,  even text-mode browsers.  However, for items that execute JavaScript  code dynamically, a more appropriate method can be used, starting  with version 2.4 of DynarchMenu.</p><p>  While still uses plain HTML syntax in order to setup handlers,  <b>unified action handlers</b> allow you to catch events in a single  function, and pass to that function enough arguments to help  determining what item has been clicked.</p><h2>First off, how do we define the menu?</h2><p>  Defining the menu is plain easy, as usual:</p><pre>  &lt;<span class="function-name">ul</span> id=<span class="string">&quot;menu&quot;</span> onclick=<span class="string">&quot;master_handler(this)&quot;</span>&gt;    &lt;<span class="function-name">li</span>&gt;Item 1&lt;<span class="function-name">/li</span>&gt;    &lt;<span class="function-name">li</span>&gt;Item 2&lt;<span class="function-name">/li</span>&gt;    &lt;<span class="function-name">li</span>&gt;      Item 3      &lt;<span class="function-name">ul</span>&gt;        &lt;<span class="function-name">li</span>&gt;SubItem 3.1&lt;<span class="function-name">/li</span>&gt;        &lt;<span class="function-name">li</span>&gt;SubItem 3.2&lt;<span class="function-name">/li</span>&gt;      &lt;<span class="function-name">/ul</span>&gt;    &lt;<span class="function-name">/li</span>&gt;  &lt;<span class="function-name">/ul</span>&gt;</pre><p>  As you can see above, we defined a normal list with items that  apparently define no actions.  However, there's one special bit: the  definition of an <tt>onclick</tt> handler in the toplevel UL  element.  This handler calls a function defined by you, and passes  to it one parameter: 鈥

⌨️ 快捷键说明

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