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

📄 item-object.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>DynarchMenu.MenuItem -- the object</h1><!-- -*- nxml -*- --><p>  When the action of some menu item involves calling a JavaScript  function, that function can determine what the clicked item is.  This helps having one handler for multiple actions, as you can learn  in <a onclick="showSection('actions'); return false;" href="actions.html">menu actions documentation</a>.  The  MenuItem object provides methods and properties that allow one to  investigate item properties or change its state, label, icon and so  on.</p><h2>Determining the item</h2><p>Say we have the following menu:</p><pre>  &lt;<span class="function-name">ul</span> id=<span class="string">&quot;menu&quot;</span>&gt;    &lt;<span class="function-name">li</span>&gt;&lt;<span class="function-name">a</span> href=<span class="string">&quot;javascript:retval = my_handler(this);&quot;</span>&gt;Item&lt;<span class="function-name">/a</span>&gt;&lt;<span class="function-name">/li</span>&gt;  &lt;<span class="function-name">/ul</span>&gt;</pre><p>  That's a very simple menu with one item.  That item calls a function  handler and assigns its value to <tt>retval</tt>; we'll talk about  <tt>retval</tt> in a moment.  The function handler can be written  like this:</p><pre>  function my_handler(action) {    var menu_item = action.info;    alert(menu_item.label);    return false;  }</pre><p>  So, in order to retrieve the menu item just use the 鈥渋nfo鈥

⌨️ 快捷键说明

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