How to restore deleted Recycle Bin
<! DOCTYPE html>
<Html>
<Head lang = "en">
<Meta charset = "UTF-8">
<Title> </title>
<Link rel = "stylesheet" href = "../css/index.css" type = "text/css"/>
<Script src = "../js/index. js"> </script>
</Head>
<Body>
<Div id = "div1" ondrop = "drop (event)" ondragover = "allowDrop (event)">
</Div>
<P id = "p1"> This is a recycle bin </p>
</Body>
</Html>
* {Margin: 0px; padding: 0px}
# Div1 {width: 220px; height: 220px; border: 3px solid # ffff00; position: absolute; left: 250px; top: 0px}
# P1 {color: # 0000ff; font-family: "正 "; font-size: 36px; text-shadow: 3px 3px 12px # ff0000}
# Div1 # img1, # img2, # img3 {width: 60px; height: 60px; display: block}/* set the image size using the width/height attribute of the img label */
# Img1 {position: absolute; left: 80px; top: 10px}
# Img2 {position: absolute; left: 80px; top: 80px}
# Img3 {position: absolute; left: 80px; top: 150px}/* absolute positioning is relative to the parent element with a fixed bit, while relative is relative to its own location */
/**
* Created by Jack's on 2015/8/9.
*/
// Window. onload = function () {}--- this cannot be used, otherwise js effect cannot be implemented
Function drag (e ){
E. dataTransfer. setData ("Text", e.tar get. id );
}
Function allowDrop (e ){
E. preventDefault ();
}
Function drop (e ){
Var data = e. dataTransfer. getData ("Text ");
E.tar get. appendChild (document. getElementById (data); // data cannot be enclosed by quotation marks.
E. preventDefault (); // case sensitive
}