To prevent the Javascript Menu Control Program I wrote from being covered by the drop-down list control, I modified the original program. The program is ready, but it is only found when it is used. Sometimes the menu cannot be displayed, and sometimes it is OK. For HTML webpages with the same display menu, I double-click it to open the display menu, but the address mapped to the virtual directory via IIS cannot be displayed again, then you can open this address on another machine and access it again !!!
I have uploaded the webpage to this address: http://gf.yf163.com/tmp/js/menu_xp.htm I can't display the menu when I open it with my computer, but I can see it on another computer of my colleague. Let me know if the menu can be displayed. Please leave a message to me. Thank you!
After tracking and debugging the program for a long time, I finally found that the problem was so strange as I thought !! Code for lines 161st and 162 of the menu Program (alai_menu_xp.js:
M. style. pixelleft = X;
M. style. pixeltop = y;
This is easy to understand and is used for menu positioning, but the problem exists here. I add a line of code before and after this code: Alert (M. Body. outerhtml )? This is the HTML code used to display the generated menu. You can imagine that the output code should be the same except for the changes to the top and left attributes. In fact, if it is displayed during the test, the result is as follows. If it is not displayed, the expected HTML code is displayed. However, after the two attributes are changed, the HTML code is changed for no reason. This is the result of a test:
<Div style = "Z-INDEX: 33; left:-200px; visibility: hidden; width: 200px; color: black; position: absolute; top: 35px; Background-color: white "> </div>
The menu content is lost after the two lines of code !!!!!!
Fainted !!!!!!!!
The old menu Program (except will be covered by the drop-down list, very easy to use) please visit http://www.9499.net? Go = tc
New Program (temporary )? Http://gf.yf163.com/tmp/js/alai_menu_xp.js