drag1.html 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!--
  2. Copyright (c) 2016, 2024, 5 Mode's contributors
  3. All rights reserved.
  4. Redistribution and use in source and binary forms, with or without
  5. modification, are permitted provided that the following conditions are met:
  6. * Redistributions of source code must retain the above copyright
  7. notice, this list of conditions and the following disclaimer.
  8. * Redistributions in binary form must reproduce the above copyright
  9. notice, this list of conditions and the following disclaimer in the
  10. documentation and/or other materials provided with the distribution.
  11. * Neither 5 Mode nor the names of its contributors
  12. may be used to endorse or promote products derived from this software
  13. without specific prior written permission.
  14. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
  15. ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
  16. WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  17. DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY
  18. DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
  19. (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
  20. LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
  21. ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  22. (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  23. SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  24. -->
  25. <!DOCTYPE html>
  26. <html lang="en-US" xmlns="http://www.w3.org/1999/xhtml">
  27. <head>
  28. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  29. <title>Objects do: an iconic js library!</title>
  30. <link rel="shortcut icon" href="./favicon.ico" />
  31. <meta name="description" content="Welcome to Objects do! Enjoy the library or contact us.."/>
  32. <meta name="keywords" content="5 Mode,object"/>
  33. <meta name="robots" content="index,follow"/>
  34. <meta name="author" content="5 Mode"/>
  35. <script src="./js/jquery-3.6.0.min.js" type="text/javascript"></script>
  36. <script src="./js/serialize-javascript.js" type="text/javascript"></script>
  37. <script src="./js/dropjs.js" type="text/javascript"></script>
  38. <link href="./css/style.css" type="text/css" rel="stylesheet">
  39. <script type="text/javascript">
  40. function myObj() {
  41. const s = "Hello World!";
  42. // Properties
  43. this.msg = s;
  44. this.start = mystart;
  45. // Methods
  46. function mystart() {
  47. alert(this.msg);
  48. }
  49. }
  50. function getObj(objName) {
  51. //alert("param"+objName);
  52. switch (objName) {
  53. case "myObj":
  54. thiss = new myObj();
  55. return thiss;
  56. }
  57. }
  58. </script>
  59. </head>
  60. <body style="margin-top:20px; padding-top:3%;">
  61. <div style="width:500px;margin:auto;">
  62. <pre style="width:300px; margin:auto; background: black; color: #FFFFFF; text-align:left">
  63. function myObj() {
  64. const s = "Hello World!";
  65. // Properties
  66. this.msg = s;
  67. this.start = mystart;
  68. // Methods
  69. function mystart() {
  70. alert(this.msg);
  71. }
  72. }
  73. </pre>
  74. <div style="float:left; text-align:center;" ondragover="onDragOver(event);" ondrop="onDrop(event);">
  75. <img src="./res/obj.png" style="width:300px" draggable="true" ondragstart="onDragStart(event);" onmouseover="onMouseOver();"><br><br>
  76. OBJECT: <input type="text" id="objName" name="objName" value="myObj">
  77. </div>
  78. <div style="float:left; width: 100px; margin-left:60px;">
  79. <br>
  80. <div style="width:fit-content; height:30px; background: orange; border: 2px solid darkorange; font-size: 16px; font-weight:900; text-align: center; padding-top: 8px;" ondragover="onDragOver(event);" ondrop="onDropJSON(event);">
  81. &nbsp;JSON&nbsp;
  82. </div>
  83. <br><br>
  84. <div style="width:fit-content; height:30px; background: orange; border: 2px solid darkorange; font-size: 16px; font-weight:900; text-align: center; padding-top: 8px;" ondragover="onDragOver(event);" ondrop="onDropJS(event);">
  85. &nbsp;Javascript&nbsp;
  86. </div>
  87. <br><br>
  88. <div style="width:fit-content; height:30px; background: orange; border: 2px solid darkorange; font-size: 16px; font-weight:900; text-align: center; padding-top: 8px;" ondragover="onDragOver(event);" ondrop="onDropINFO(event);">
  89. &nbsp;Info&nbsp;
  90. </div>
  91. <br><br>
  92. <div style="width:fit-content; height:40px; background: orange; border: 2px solid darkorange; font-size: 16px; font-weight:900; text-align: center; padding-top: 8px;" ondragover="onDragOver(event);" ondrop="onDropMoon(event);">
  93. &nbsp;Inject<br>Hello Moon&nbsp;
  94. </div>
  95. </div>
  96. </div>
  97. <!-- Yandex.Metrika counter -->
  98. <script type="text/javascript" >
  99. (function(m,e,t,r,i,k,a){m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
  100. m[i].l=1*new Date();k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)})
  101. (window, document, "script", "https://mc.yandex.ru/metrika/tag.js", "ym");
  102. ym(86762230, "init", {
  103. clickmap:true,
  104. trackLinks:true,
  105. accurateTrackBounce:true
  106. });
  107. </script>
  108. <noscript><div><img src="https://mc.yandex.ru/watch/86762230" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
  109. <!-- /Yandex.Metrika counter -->
  110. </body>
  111. </html>