corecodeschool.blogspot.com: How to show drag and drop event in textarea using event.type in javascript

Tuesday, 29 March 2016

How to show drag and drop event in textarea using event.type in javascript

dragdrop1.html



<html>
    <head>
        <title>Show Event Drag And Drop</title>
        <script type="text/javascript">
            function handleDragDropEvent(oEvent)
            {
                var oTextbox = document.getElementById("txtara");
                oTextbox.value = oTextbox.value + oEvent.type + "\n";
            }
        </script>
    </head>
    <body>
        <P>This is a text</p>
        <input type="text"
               ondragenter="handleDragDropEvent(event)"
               ondragover="handleDragDropEvent(event)"
               /></p>

        <P><textarea rows="12" cols="23"  id="txtara"></textarea></p>
    </body>
</html>

No comments:

Featured post

what is ajax?how to create ajax with php code

Ajax Introduction -  એજેક્સ નો ઉપીયોગ કરી ને તમે પેજ લોડ કાર્ય વિના બધી માહિતી મેળવી શકો.એજેક્સ થી તમે કોઈ પણ ડેટા ઝડપ થી મેળવી શકો છો...