?? systemdraganddropexample9.htm
字號:
<html>
<head>
<title>System Drag And Drop Example</title>
<script type="text/javascript">
function handleDragDropEvent(oEvent) {
switch(oEvent.type) {
case "dragstart":
oEvent.dataTransfer.effectAllowed = "copy";
break;
case "dragenter":
oEvent.dataTransfer.dropEffect = "copy";
oEvent.returnValue = false;
break;
case "dragover":
oEvent.returnValue = false;
break;
case "drop":
oEvent.returnValue = false;
oEvent.srcElement.innerHTML = oEvent.dataTransfer.getData("text");
}
}
</script>
</head>
<body>
<p>Try dragging the text in the textbox to the red square.
The text will be "copied" to the red square.</p>
<p><input type="text" value="drag this text" ondragstart="handleDragDropEvent(event)" />
<div style="background-color: red; height: 100px; width: 100px"
ondragenter="handleDragDropEvent(event)"
ondragover="handleDragDropEvent(event)"
ondrop="handleDragDropEvent(event)"></div>
</p>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -