How to implement the left and right key menu on the control placed on the ASP.NET page, at the same time (2)

zhaozj2021-02-16  62

9CBS - Document Center - .Net Title How to implement the left and right key menu on the control placed on the ASP.NET page, and the operation (2) LYX123 (original) keyword ASP.NET, right-click menu

The above says that the menu is created. Now it is the second part: (2), select the menu, click the menu to select the menu and click the menu to actually Mousemove and Click events in the mouse. In the Menustyle mentioned above, I am using the Window.createPopup function provided by JavaScript to implement the pop-up menu, the contents of the pop-up menu are a table. Mousemove and Click events are available in each item in the table. When I happened in the Mousemove event, I made him show a different style. When the Click event occurs, the function fnclick is called so that we have the task of our needs. Now specifically describe the Menustyle () function.

Function menustyle () {

if (window.navigator.appName == "Microsoft Internet Explorer" && window.navigator.appVersion.substring (window.navigator.appVersion.indexOf ( "MSIE") 5, window.navigator.appVersion.indexOf ( "MSIE") 8)> = 5.5)

ISIE = 1;

Else

ISIE = 0;

IF (isie) {menucontent = '

// This line is painted A table, starting from below, adding items in the form, and gives the Mouseover style. One of the most critical places is the function of the OnClick event call to Parent.fnClickMenu, specially reminded that the call is a function of the parent window.

FOR (m = 0; m ) {

IF (MenuItems [M] [0] && Menuitems [M] [2])

MenuContent = '

' ELSE IF (Menuitems [M] [0])

MenuContent = '

' MENUITEMS [M] [0] ' ';

Else

MenuContent = '

';}

MenuContent = '

'; // The following will pop up a menu.

Menupopup = window.createpopup ();

// The menu is the table drawn above.

Menupopup.Document.body.innerhtml = menucontent;

Combined with the showMenu (), functions of the above, it understands how to implement the pop-up menu function. In the FnclickMenu function. You can easily add a variety of features you want to handle.

Everyone looks at the official, if you don't understand, I hope to communicate with me. Email: l_yx123@sina.com.cn

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

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.028, SQL: 9