<body> <script>//close div MENU function menuclose () {var menudiv = document.getElementById ("Menudiv"); if (menudiv!= null) {document.body.removeChild (menudiv); }//Create Menu function Menupanel (Opflag,operid, left, top) {var menudiv = document.getElementById ("Menudiv"); if (menudiv!= null) {document.body.removeChild (menudiv); var Useflag = "Deactivate account"; var Flag=opflag; if (flag = = "0") {Useflag = "deactivate account"; else {Useflag = "activate account"; } Menudiv = document.createelement ("div"); Menudiv.id = "Menudiv"; Menudiv.onmouseleave = function () {menuclose (); } MenuDiv.style.position = "absolute"; MenuDiv.style.setAttribute ("ZIndex", "201"); MenuDiv.style.setAttribute ("BackgroundColor", "#EFEFEF"); MenuDiv.style.setAttribute ("Font", "10pt"); MenuDiv.style.setAttribute ("width", 60); MenuDiv.style.setAttribute ("left", left); MenuDiv.style.setAttribute ("Top", top); menudiv.innerhtml = "<table width=\" 100%\ ">" + "<tr><td onclick=\" JavasCript:redirecturl (1, ' "+ Flag +" ', ' "+ Operid +"); Menuclose (); \ "Style=\" cursor:hand;height:20px; Color:blue;\ "onmouseover=\" this.style.backgroundcolor= ' #FFD76B '; \ onmouseout=\ ' this.style.backgroundcolor= ' Efefef '; \ align=\ "Left\" valign=\ "top\" > "+useflag+" </td></tr> "+" <tr><td onclick=\ " RedirectURL (0,0, ' "+ Operid +") \ "Style=\" cursor:hand;height:20px; Color:blue;\ "onmouseover=\" this.style.backgroundcolor= ' #FFD76B '; \ onmouseout=\ ' this.style.backgroundcolor= ' Efefef '; \ align=\ "Left\" valign=\ "top\" > Modify account </td></tr> "+" <tr><td onclick=\ "javascript: RedirectURL (4,0, ' "+ Operid +") \ "Style=\" cursor:hand;height:20px; Color:blue;\ "onmouseover=\" this.style.backgroundcolor= ' #FFD76B '; \ onmouseout=\ ' this.style.backgroundcolor= ' Efefef '; \ align=\ "Left\" valign=\ "top\" > Reset Password </td></tr> "+ <tr><td onclick=\" RedirectURL ( 2,0, ' "+ Operid +"] \ "Style=\" cursor:hand;height:20px; Color:blue;\ "Onmouseover=\" This.style.bacKgroundcolor= ' #FFD76B '; \ "onmouseout=\" this.style.backgroundcolor= ' #EFEFEF '; \ "align=\" Left\ "valign=\" Top\ "> Role management </td></tr> "+" <tr><td onclick=\ "Javascript:redirecturl (3,0, '" + Operid + ") \" Style=\ " cursor:hand;height:20px; Color:blue;\ "onmouseover=\" this.style.backgroundcolor= ' #FFD76B '; \ onmouseout=\ ' this.style.backgroundcolor= ' EFEFEF '; \ "align=\" Left\ "valign=\" top\ "> Delete account </td></tr>" + "</table>"; Document.body.appendChild (MENUDIV); //Get the height and width of the control function Getabsolutepos (e) {var t=e.offsettop; var l=e.offsetleft; while (e=e.offsetparent) {t+=e.offsettop; L+=e.offsetleft; var pos = {x:l, y:t}; return POS; } </script> <div id= "jb51net" onclick= "Menupanel ()" > Cloud-dwelling Community Code test (click to select) </div> </body>
[Ctrl + A All SELECT Note: If the need to introduce external JS need to refresh to perform]