Themabewertung:
  • 0 Bewertung(en) - 0 im Durchschnitt
  • 1
  • 2
  • 3
  • 4
  • 5
Bitte um Hilfe - Kalenderprojekt
#3
Dabke, habe dir eine PN geschickt. Ich habe versucht, Dein Beispiel mit meinem HTML-Code zu verheiraten. Die Eingabe soll im linken Datumsfeld erfolgen. Wenn der Button A gedrückt wird, soll der Wert in das rechte Datumsfenster geschrieben werden. Klappt leider nicht:

<!DOCTYPE html>

<head>
<title>Datumsrechner</title>
<meta charset="UTF-8">

<style>

div { position:absolute; border:none; margin:0px; padding:0px; }

p { position:absolute; border:none; margin:0px; padding:0px; font-size:24px; font-familyConfusedans-serif; }

form { border:none; margin:0px; padding:0px; font-size:24px; font-familyConfusedans-serif; }

input { position:absolute; border-styleConfusedolid; border-size:2px; border-color:black; margin:0px; padding:0px; text-align:center; font-size:24px; font-familyConfusedans-serif; }

select { position:absolute; border-styleConfusedolid; border-size:2px; border-color:black; margin:0px; padding:0px; text-align:center; font-size:16px; font-familyConfusedans-serif; }

.butt { position:absolute; right:10px; width:44px; text-align:center; background-color:#598359; border: 2px solid #598359; border-style:outset; border-radius:10px;}

.link { position:absolute; width:175px; height:37px; text-align:center; background-color:#d9d9d9; border: 2px solid #b3b3b3; border-style:outset; }

.eingabe { position:absolute; text-align:center; }

</style>

</head>



<body style="background-color:#bbbbbb">

<div style="width:100%;">

<div style="position:relative; width:620px; margin-left:auto; margin-right:auto;">

<h1 style="position:absolute; top:-28px; width:620px; font-size:36px; font-familyConfusedans-serif; text-align:center;">
Datumsrechner</h1>

<form>

<div style="top:75px; width:300px;">

<img src="zurueck.gif" alt="" style="position:absolute; top:3px; left:60px;">

<input type="button" style="top:3px; left:60px; height:29px; width:29px; z-index:9; background-color:transparent; border-style:none;" onclick="zurueck()">

<p style="top:4px; width:300px; text-align:center;">- 1 Tag</p>



<!-- KALENDER A -->

<div id="lemrahmen" style="top:40px; width:293px; height:404px; border-styleConfusedolid; border-width:4px; border-color:black; background-color:white;">

<p style="top:37px; width:292px; font-weight:bold; text-align:center;" id="lemtag">WOCHENTAG</p>

<input type="text" id="lemdatum" style="top:75px; left:96px; width:100px; height:100px; font-size:80px; font-weight:bold;" maxlength="2">

<input type="button" id="lembdatum" class="butt" value="A" style="top:129px; height:113px;" onclick="ein1()">

<input type="text" id="lemmonat" style="top:187px; left:74px; width:150px; font-weight:bold;" maxlength="10">

<input type="text" id="lemjahr" style="top:226px; left:74px; width:150px; font-weight:bold;" maxlength="12">

</div>

<div id="lembalken" style="top:40px; width:300px; height:34px; background-color:black;">
<p style="width:300px; top:2px; text-align:center; color:white;"><b>KALENDER A</b></p>
</div> </div>


<div style="top:75px; left:320px; width:300px;">

<img src="vor.gif" alt="" style="position:absolute; top:3px; right:60px;">

<input type="button" style="top:3px; right:60px;height:29px; width:29px; z-index:10; background-color:transparent; border-style:none;" onclick="vor()">

<p style="top:4px; width:300px; text-align:center;">+ 1 Tag</p>





<!-- KALENDER B -->


<div id= "grahmen" style="top:40px; width:293px; height:404px; border-styleConfusedolid; border-width:4px; border-color:black; background-color:white;">

<p style="top:37px; width:292px; font-weight:bold; text-align:center;" id="gtag">WOCHENTAG</p>

<input type="text" id="terradatum" style="top:75px; left:96px; width:100px; height:100px; font-size:80px; font-weight:bold;" maxlength="2">

<input type="button" id="terrabuttondatum" class="butt" value="B" style="top:129px; height:113px;" onclick="ein4()">

<input type="text" id="terramonat" style="top:187px; left:74px; width:150px; font-weight:bold;" maxlength="10">

<input type="text" id="terrajahr" style="top:226px; left:74px; width:150px; font-weight:bold;" maxlength="12">

</div>

<div id="terrabalken" style="top:40px; width:300px; height:34px; background-color:black;">

<p style="width:300px; top:2px; text-align:center; color:white;"><b>KALENDER B</b></p>
</div> </div>


</form>

</div>

</div>

<script>

// BEGINN SCRIPT

document.addEventListener("DOMContentLoaded", function() {
let lemdatum = document.getElementById('lemdatum');
let lembdatum = document.getElementById('lembdatum');
let lemdatum = terradatum;

lembdatum.addEventListener('click', function () {
document.getElementById("terradatum").innerHTML = "";
});
});

//ENDE SCRIPT



</script>



</body>

</html>
Zitieren


Nachrichten in diesem Thema
Bitte um Hilfe - Kalenderprojekt - von Javafan - 06.12.2023, 16:02
RE: Bitte um Hilfe - Kalenderprojekt - von Javafan - 21.12.2023, 21:35

Gehe zu:


Benutzer, die gerade dieses Thema anschauen:
1 Gast/Gäste