Follow along with the video below to see how to install our site as a web app on your home screen.
Anmerkung: This feature may not be available in some browsers.
<!DOCTYPE html>
<html>
<head>
<title>test</title>
<style type="text/css">
#drawBox {
width: 250px;
height: 250px;
background-color: red;
}
</style>
<script type="text/javascript">
function callDisObj() {
var tempDiv = document.getElementById('drawBox');
var newDiv = document.createElement("div");
Wie geht's weiter?
}
</script>
</head>
<body>
<div id="navigationBox" style="float: left; width: 25%; height: 100%">
<div id="roofBox">
<input type="button" value="Störobjekt hinzufügen" oncontextmenu="callDisObj()">
</div>
</div>
<div id="drawBox" style="float: left">
</div>
</body>
</html>
function callDisObj() {
// Erstellen des neuen div Elements
// und Einfügen von Inhalt
var newDiv = document.createElement("div");
var newContent = document.createTextNode("Hallihallo und schönen Gruß!");
newDiv.appendChild(newContent);
// Textknoten dem zuvor erstellten div hinzufügen.
// Das neu erstellte Element und sein Inhalt der DOM-Struktur hinzufügen
my_div = document.getElementById("drawBox");
document.body.insertBefore(newDiv, my_div);
}