Click the left button anywhere on the web page and it will pop up. In fact, JS is used to control the display of the DIV layer. A table is nested in the DIV layer, and the menu is placed in the table. This makes it easy to modify. It doesn’t matter if you don’t know how to CSS. You can copy it, open it with DW and re-modify the menu style, and change it to your favorite color.
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>Hide menu</title> <style type="text/css"> body { font: 9pt; } .box { font: 9pt "Songyi"; position: absolute; background: skyblue; } </style> </head> <body> <table cellpadding="5" class="box" style="display:none"> <tr> <td bgcolor="#0066cc">Website navigation:</td> </tr> <tr> <td><a href="/">AJAXExample</a></td> </tr> <tr> <td><a href="/jscss/">jQueryRelated</a></td> </tr> <tr> <td><a href="/jscss/">ExtJSDemo</a></td> </tr> </table> </center> </div> <script language="JavaScript"> = popUp function popUp() { newX = + newY = + menu = if ( == ""){ = "none" } else { = ""} = newX - 50 = newY - 50 } </script> <body> <p align="center"><font size="3">Click the left button to see?</p> </body> </html>
I hope this article will be helpful to everyone's JavaScript programming.