systeminfo.svg

来自「java开源的企业总线.xmlBlaster」· SVG 代码 · 共 50 行

SVG
50
字号
<svg width='200' height='200' onload="on_load(evt)">   <!-- To view it use embed.html -->   <script><![CDATA[      /*      NOTE:      Mozilla with Adobe SVG plugin does NOT support:      ->  Exporting the svgdoc handle to the outer HTML      Only Mozilla 0.91 with Adobe SVG plugin does support:      ->  Accessing the embeded SVG from out HTML with          document.embeds["systemInfoSVGPlugin"].getSVGDocument()      ->  Reported to bugzilla # 115528      */      var ii=20;      var addit=true;   	function on_load(evt)      {	   	// Save a pointer to the svgDocument object so that we can use it later   		svgdoc = evt.getCurrentNode().getOwnerDocument();      }      function sayHello(text)      {         alert(text);      }      function change_attribut(evt)      {         svgdoc=evt.getTarget().getOwnerDocument();         objet=svgdoc.getElementById('rectangle.CPU');         objet.setAttribute('width',ii);         objet.setAttribute('height','80');         objet.getStyle().setProperty('fill','red')         if (addit)            ii+=20;         else            ii-=20;         if (ii == 200)            addit=false;         if (ii == 20)            addit=true;      }   ]]></script>   <g id='systemInfoGroup'>      <text id='text.CPU' x='10' y='40' style='text-anchor:left;font-size:24;font-family:Arial;fill:red'>CPU</text>      <rect id='rectangle.CPU' onclick='change_attribut(evt)' x='80' y='20' width='100' height='20' style='fill:black'/>      <text id='text.RAM' x='10' y='80' style='text-anchor:left;font-size:24;font-family:Arial;fill:red'>RAM</text>      <rect id='rectangle.RAM' onclick='change_attribut(evt)' x='80' y='60' width='100' height='20' style='fill:black'/>   </g></svg>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?