corecodeschool.blogspot.com: How to drag and drop between two textbox

Enter Keyword Hear for Search This Blog

Tuesday, 29 March 2016

How to drag and drop between two textbox

twobox.html



<html>
    <head>
        <title>Drag And Drop between two textbox</title>
        <script type="text/javascript">
            function handleDragDropEvent(oEvent) {
                var oTextbox = document.getElementById("txtara");
                oTextbox.value =oTextbox.value + oEvent.type + "\n";
            }
        </script>
    </head>
    <body>
        <P>Dragging the text from the left textbox to the right textbox.</p>
        <P>
        <input type="text" value="drag this text"/>
        <input type="text"
               ondragenter="handleDragDropEvent(event)"
               ondragover="handleDragDropEvent(event)"
                             />
        </p>
        <P><textarea rows="12" cols="23" readonly="readonly" id="txtara"></textarea></p>
    </body>
</html>

No comments:

Featured post

Contact

Contact Core Code School Core Code School shares beginner-friendly tutorials on PHP, HTML, CSS, JavaScript, Java, SQL and Ubuntu. You can...