Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- use strict;
- my $xhtml = "";
- $xhtml .= <<EOT;
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- <head>
- </head>
- <style type="text/css" media="screen">
- #popitmenu{
- position: absolute;
- background-color: yellow;
- border:1px solid black;
- font: normal 12px Verdana;
- line-height: 18px;
- z-index: 100;
- visibility: hidden;
- -moz-box-shadow: 5px 5px 5px #666;
- margin: 0px 0px;
- }
- #popitmenu a{
- text-decoration: none;
- padding-left: 6px;
- color: black;
- display: block;
- }
- #popitmenu a:hover{ /*hover background color*/
- background-color: #CCFF9D;
- }
- </style>
- <body>
- <div id="popitmenu" onMouseover="clearhidemenu()" onMouseout="dynamichide(event)"></div>
- <svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="1100px" height="1500px">
- <script type="application/ecmascript"> <![CDATA[
- function circle_click(evt) {
- var circle = evt.target;
- var currentRadius = circle.getAttribute("r");
- if (currentRadius == 100)
- circle.setAttribute("r", currentRadius*2);
- else
- circle.setAttribute("r", currentRadius*0.5);
- }
- ]]> </script>
- <script type="application/ecmascript"> <![CDATA[
- var defaultMenuWidth="150px";
- var ie5=document.all;
- var ns6=document.getElementById&&!document.all;
- var ns4=document.layers;
- function downmenu(evt,admin,finfo)
- {
- var code = new Array();
- code = '';
- code += '<a href="/www.test.com" '+ admin + '>Link<a>';
- code += '<a href="/telnet.pl.?' + finfo + ' ">telnet</a> ';
- showmenu(evt, code, '100px');
- }
- function showmenu(e,code,optWidth)
- {
- if (!document.all&&!document.getElementById&&!document.layers) return;
- clearhidemenu()
- menuobj=ns6? document.getElementById("popitmenu") : ns4? document.popmenu : ""
- menuobj.thestyle=(ie5||ns6)? menuobj.style : menuobj
- menuobj.innerHTML=code;
- menuobj.style.width=(typeof optWidth!="undefined")? optWidth : defaultMenuWidth
- menuobj.contentwidth=menuobj.offsetWidth
- menuobj.contentheight=menuobj.offsetHeight
- eventX=ie5? event.clientX : e.clientX
- eventY=ie5? event.clientY : e.clientY
- var rightedge=ie5? iecompattest().clientWidth-eventX : window.innerWidth-eventX
- var bottomedge=ie5? iecompattest().clientHeight-eventY : window.innerHeight-eventY
- if (rightedge<menuobj.contentwidth)
- menuobj.style.left=ie5? iecompattest().scrollLeft+eventX-menuobj.contentwidth+"px" : window.pageXOffset+eventX-menuobj.contentwidth+"px"
- else
- menuobj.style.left=ie5? iecompattest().scrollLeft+eventX+"px" : window.pageXOffset+eventX+"px"
- if (bottomedge<menuobj.contentheight)
- menuobj.style.top=ie5? iecompattest().scrollTop+eventY-menuobj.contentheight+"px" : window.pageYOffset+eventY-menuobj.contentheight+"px"
- else
- menuobj.style.top=ie5? iecompattest().scrollTop+event.clientY+"px" : window.pageYOffset+eventY+"px"
- menuobj.style.visibility="visible"
- return false
- }
- function contains_ns6(a, b) {
- while (b.parentNode)
- if ((b = b.parentNode) == a) return true;
- return false;
- }
- function hidemenu()
- { if (window.menuobj) menuobj.style.visibility="hidden" }
- function dynamichide(e)
- { if (ie5&&!menuobj.contains(e.toElement)) hidemenu()
- else
- if (ns6&&e.currentTarget!= e.relatedTarget&& !contains_ns6(e.currentTarget, e.relatedTarget))
- hidemenu()
- }
- function delayhidemenu(){ delayhide=setTimeout("hidemenu()",500) }
- function clearhidemenu(){ if (window.delayhide) clearTimeout(delayhide) }
- if (ie5||ns6) document.onclick=hidemenu
- ]]>
- </script>
- <ellipse cx="240" cy="50" rx="220" ry="30" style="fill:yellow" />
- <ellipse cx="220" cy="50" rx="190" ry="20" style="fill:white" />
- <ellipse cx="240" cy="50" rx="220" ry="30" style="fill:yellow" />
- <ellipse cx="220" cy="50" rx="190" ry="20" style="fill:white" />
- <rect onmouseover="downmenu(evt,'ddd','eee')" onmouseout="delayhidemenu()" x="200" y="600" width="50" height="50" style="fill:rgb(0,0,255);" />
- <circle onclick="circle_click(evt)" cx="300" cy="525" r="100" fill="red"/>
- <text x="300" y="480" font-family="Verdana" font-size="35" text-anchor="middle">gggg </text>
- </svg>
- </body>
- </html>
- EOT
- print "Content-type: application/xhtml+xml; charset=utf-8 \n\n";
- print $xhtml;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement