systemdraganddropexample2.htm

来自「这是javascript高级程序设计的源码」· HTM 代码 · 共 20 行

HTM
20
字号
<html>
    <head>
        <title>System Drag And Drop Example</title>
        <script type="text/javascript">
            function handleDragDropEvent(oEvent) {
                var oTextbox = document.getElementById("txt1");
                oTextbox.value +=  oEvent.type + "\n";
            }                        
        </script>
    </head>
    <body>
        <p>Try dragging the text from the left textbox to the right one.</p>
        <p><input type="text" value="drag this text" />
        <input type="text" ondragenter="handleDragDropEvent(event)" 
               ondragover="handleDragDropEvent(event)" ondragleave="handleDragDropEvent(event)" 
               ondrop="handleDragDropEvent(event)" /></p>
        <p><textarea rows="10" cols="25" readonly="readonly" id="txt1"></textarea></p>        
    </body>
</html>

⌨️ 快捷键说明

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