Handling experience of events in the Window.createPopup window

zhaozj2021-02-16  125

I used to write on another blog, I plan to take my home in 9cbs, so I turn over :)

------------------------------------------------

Yesterday, my brother gave a drop-down list control, VBS wrote, browsing it, I feel good. My buddies said: Can you turn into a JS version. Looking at the lower source code, it is better to do with the cat and painting.

First determine the demand. After you clear the demand :)

When dropped, the display of the data list, I chose the Popup window, the reason is: Support cross-window, display high priority

When programming, it is found that the script operation Popup window has a critical difficulty, which is to write to the event, style and other programming, need full writing to the inside of the form.

After the processing of form events, after exchange with friends, she uses JS object-defined methods:

Implementation code: var opopup = window.createpopup (); var opopbody = opopup.document.body; opopbody.οkeydowwn = opOpup_onkeydown; function opopup_onkeydown () ()

Alert ("ok");} var html = "

SSM1226 "; opupbody.innerhtml = HTML;

The above code, basically realizes the response and processing of the POPUP form onkeyDown event. There is a relatively special attribute: Tabindex

At first didn't join this attribute, but found that the response onkeyDown event is always a body-free DIV key reason: MSDN has such a paragraph about TabINDEX attributes: an element can have focus if the Tabindex property is set to Tabindex Property is set To Any Valid Negative or Positive Integer.

The Following Elements Can Have Focus and is Tab Stops by Default: a, Body, Button, Frame, IFRAME, IMG, INPUT, ISINDEX, OBJECT, SELECT, TEXTAREA.

The Following Elements CAN Have Focus by Default But Are Not Tab Stops. There Elements Can Be Set As Tab Stops by Setting The Tabindex Property to A Positive Integer. Applet, Div, Frameset, Span, Table, TD.

Setting The theid and tfoot elements to participate in the Tab Order Will NOT CAUSE The Focus Rectangle To Display When Either Receives Focus.

转载请注明原文地址:https://www.9cbs.com/read-8897.html

New Post(0)