Guest User

Untitled

a guest
Jun 15th, 2021
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.03 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4.     <meta charset="UTF-8">
  5.     <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6.     <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7.     <title>Document</title>
  8. </head>
  9. <body>
  10.     <svg width="100" height="100">
  11.         <g id="hotspot.0" onmouseover="ShowHotSpot(evt,'0')" onmouseout="HideHotSpot(evt,'0')" onmousemove="ShowToolTip(evt,'0','SAM8834P00009 HOOP')" onclick="myFunction('SAM8834P00009 HOOP')" opacity="1">
  12.             <rect x="0" y="0" width="13.5232" height="11.9322" style="fill:#00ff00;fill-rule:evenodd;"/>
  13.         </g>
  14.     </svg>
  15.  
  16.     <script>
  17.         function myFunction(value) {
  18.             /* Get the text field */
  19.             console.log(value);
  20.  
  21.             var dummy = document.createElement("textarea");
  22.             document.body.appendChild(dummy);
  23.             dummy.value = value;
  24.             dummy.select();
  25.             document.execCommand("copy");
  26.             document.body.removeChild(dummy);
  27.         }
  28.     </script>
  29. </body>
  30. </html>
Advertisement
Add Comment
Please, Sign In to add comment