Html程序  |  32行  |  1.01 KB

<html lang="en">
  <head>
    <META HTTP-EQUIV="CONTENT-TYPE" CONTENT="text/html; charset=UTF-8">
    <title>Menu key testing</title>
    <script language="javascript" type="text/javascript">
      function log(str) {
        var li = document.createElement("li");
        li.appendChild(document.createTextNode(str));
        var results = document.getElementById("results");
        results.appendChild(li);
      }
    </script>
  </head>
  <body>
    <p>
    See bug: <a href="https://bugs.webkit.org/show_bug.cgi?id=30619">30619</a>.
    Note: this test is only applicable for Linux and Windows.
    </p>
    <ol>
      <li>Click the text input box below and press Menu key.
          The test passes if you see 'PASS' below.
        <input type="text" oncontextmenu="log('PASS');" />
      </li>
      <li oncontextmenu="log('PASS');">Click or select somewhere
      in this text and press Menu key.
      The test passes if you see additional 'PASS' below.
      </li>
    </ol>
    <ul id="results"></ul>
  </body>
</html>