-
Notifications
You must be signed in to change notification settings - Fork 0
Identidock neu: Vorschlag für ein neues Aussehen
<!DOCTYPE html>
<html>
<head>
<title>Identidock-neu: Vorzeigemuster</title>
<script type="text/javascript">
function init() {
// Image erzeugen
var x4 = document.getElementById("bd");
var y4 = document.createElement("img");
y4.setAttribute("id", "pic");
y4.setAttribute("src", "https://www.smilies.4-user.de/include/Froehlich/giggling.gif");
x4.appendChild(y4);
}
function ausgabe(auswahl) {
var text = "";
text += auswahl[auswahl.selectedIndex].text;
// alert (text);
// Image löschen
var x4 = document.getElementById("bd");
var y4 = document.getElementById("pic");
x4.removeChild(y4);
// alert("HALT")
// Image ändern
var x5 = document.getElementById("bd");
var y5 = document.createElement("img");
y5.setAttribute("src", text);
y5.setAttribute("id", "pic");
x5.appendChild(y5);
}
</script>
</head>
<body id="bd" onload="init()">
Dies ist nur ein Vorzeigemuster
<div id="a1">
<div id="a2">
Dies ist nur ein Vorzeige-Prototyp
<p>
von <b>Face-<i>images</i></b>...
</div>
</div>
<div id="b1">
Peter
</div>
<div id="b2">
Paul
</div>
<form>
<p>
<select id="liste" name="liste">
<option>https://upload.wikimedia.org/wikipedia/commons/thumb/7/70/Face-devil-grin.svg/240px-Face-devil-grin.svg.png</option>
<option>https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-surprise.svg/240px-Face-surprise.svg.png</option>
<option>https://upload.wikimedia.org/wikipedia/commons/thumb/7/79/Face-smile.svg/240px-Face-smile.svg.png</option>
<option>https://upload.wikimedia.org/wikipedia/commons/thumb/5/57/Face-wink.svg/240px-Face-wink.svg.png</option>
<option>https://upload.wikimedia.org/wikipedia/commons/thumb/4/4d/Face-blush.svg/240px-Face-blush.svg.png</option>
<option>https://upload.wikimedia.org/wikipedia/commons/thumb/b/bc/Face-grin.svg/240px-Face-grin.svg.png<option>
</select>
<input type="button" value="Face anzeigen"
onclick="ausgabe(this.form.liste)">
</p>
</form>
</body>
</html>