24.09.2026
This commit is contained in:
@@ -13,38 +13,17 @@
|
|||||||
<input type="text" name="userName" id="username" placeholder="Jonny">
|
<input type="text" name="userName" id="username" placeholder="Jonny">
|
||||||
<br><br>
|
<br><br>
|
||||||
<label for="password">Passwort</label>
|
<label for="password">Passwort</label>
|
||||||
<input type="password" id="togglePasswordBtn" name="passWord" placeholder="Password"><br><br>
|
<div>
|
||||||
|
<input type="password" id="togglePasswordBtn" class="passField" name="passWord" placeholder="Password">
|
||||||
|
<button class="icon"> 👁 </button><br><br>
|
||||||
|
</div>
|
||||||
<button id="togglePasswordBtn" onclick="togglePassword()">Passwort anzeigen/ausblenden</button><br>
|
<button id="togglePasswordBtn" onclick="togglePassword()">Passwort anzeigen/ausblenden</button><br>
|
||||||
<button id="togglePasswordBtn2">Passwort anzeigen/ausblenden</button>
|
<button id="togglePasswordBtn2">Passwort anzeigen/ausblenden</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<script>
|
<script src="assets/js/scripts.js"></script>
|
||||||
function togglePassword(){
|
|
||||||
var passwordField = document.getElementById("togglePasswordBtn");
|
|
||||||
|
|
||||||
if(passwordField.type === 'password'){
|
|
||||||
passwordField.type = 'text';
|
|
||||||
}
|
|
||||||
else if(passwordField.type === 'text'){
|
|
||||||
passwordField.type = 'password';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
document.getElementById('togglePasswordBtn2').addEventListener('click', function() {
|
|
||||||
var passwordField2 = document.getElementById("togglePasswordBtn");
|
|
||||||
|
|
||||||
if(passwordField2.type === 'password'){
|
|
||||||
passwordField2.type = 'text';
|
|
||||||
}
|
|
||||||
else if(passwordField2.type === 'text'){
|
|
||||||
passwordField2.type = 'password';
|
|
||||||
}
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="de">
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||||
|
<title></title>
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<link rel="stylesheet" href="">
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<!--[if lt IE 7]>
|
||||||
|
<p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="#">upgrade your browser</a> to improve your experience.</p>
|
||||||
|
<![endif]-->
|
||||||
|
|
||||||
|
<script>
|
||||||
|
|
||||||
|
function test(para1, para2){
|
||||||
|
document.write("Parameter 1 ist imt dem Wert: " + para1 + "<br />");
|
||||||
|
document.write("Parameter 2 ist imt dem Wert: " + para2 + "<br />");
|
||||||
|
|
||||||
|
for(var i = 2; i < arguments.length; i++)
|
||||||
|
{
|
||||||
|
document.write("Zusätzliche Paramter " + (i -1) + " mit dem Wert: " + arguments[i] + "<br />");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
test(10,11,12,13,15,16,17,18,19,20);
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
@@ -10,7 +10,7 @@ body {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background-color: #f9f9f9;
|
background-color: #f9f9f9;
|
||||||
}
|
}
|
||||||
input[type="text"], input[type="password"] {
|
input[type="text"] {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
margin: 8px 0;
|
margin: 8px 0;
|
||||||
@@ -19,6 +19,8 @@ input[type="text"], input[type="password"] {
|
|||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
button {
|
button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
@@ -32,3 +34,25 @@ button {
|
|||||||
button:hover {
|
button:hover {
|
||||||
background-color: #45a049;
|
background-color: #45a049;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
input[type="password"].passField {
|
||||||
|
width: calc(100% - 40px);
|
||||||
|
padding: 10px;
|
||||||
|
margin: 8px 0;
|
||||||
|
display: inline-block;
|
||||||
|
border: 1px solid #ccc;
|
||||||
|
border-radius: 4px;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.icon {
|
||||||
|
width: 30px;
|
||||||
|
padding: 9px;
|
||||||
|
margin: 0px;
|
||||||
|
background-color: #4CAF50;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
function togglePassword(){
|
||||||
|
var passwordField = document.getElementById("togglePasswordBtn");
|
||||||
|
|
||||||
|
if(passwordField.type === 'password'){
|
||||||
|
passwordField.type = 'text';
|
||||||
|
}
|
||||||
|
else if(passwordField.type === 'text'){
|
||||||
|
passwordField.type = 'password';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById('togglePasswordBtn2').addEventListener('click', function() {
|
||||||
|
var passwordField2 = document.getElementById("togglePasswordBtn");
|
||||||
|
|
||||||
|
if(passwordField2.type === 'password'){
|
||||||
|
passwordField2.type = 'text';
|
||||||
|
}
|
||||||
|
else if(passwordField2.type === 'text'){
|
||||||
|
passwordField2.type = 'password';
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -15,11 +15,39 @@ input{
|
|||||||
|
|
||||||
|
|
||||||
.webBox{
|
.webBox{
|
||||||
text-align: center;
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxText{
|
.btnBG{
|
||||||
display:block;
|
color: red;
|
||||||
float:left;
|
}
|
||||||
padding:5px 10px
|
|
||||||
|
@media screen and (max-width: 600px) {
|
||||||
|
|
||||||
|
button {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 8px ;
|
||||||
|
background-color: #4CAF50;;
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.btnColor {
|
||||||
|
width: 100%;
|
||||||
|
padding: 10px;
|
||||||
|
margin: 8px ;
|
||||||
|
background-color: #4CAF50;;
|
||||||
|
color: red;
|
||||||
|
border: none;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1,19 +1,19 @@
|
|||||||
function setSize(varWidth, varHeight){
|
function setSize(varWidth, varHeight){
|
||||||
var box = document.getElementById("webBoxSel");
|
let box = document.getElementById("webBoxSel");
|
||||||
var boxHeight = (varHeight / 2);
|
let boxHeight = (varHeight / 2);
|
||||||
var boxwidth = (varWidth / 2);
|
let boxWidth = (varWidth / 2);
|
||||||
|
|
||||||
if(boxHeight >= 300)
|
if((boxHeight >= 300) && (boxWidth >= 300))
|
||||||
{
|
{
|
||||||
box.style.backgroundColor = 'red';
|
box.style.backgroundColor = 'red';
|
||||||
}else{
|
}else{
|
||||||
box.style.backgroundColor = 'yellow';
|
box.style.backgroundColor = 'yellow';
|
||||||
}
|
}
|
||||||
|
|
||||||
box.style.width = boxwidth+'px';
|
box.style.width = boxWidth+'px';
|
||||||
box.style.height = boxHeight+'px';
|
box.style.height = boxHeight+'px';
|
||||||
|
|
||||||
var textInBox = document.getElementById("boxText");
|
let textInBox = document.getElementsByClassName('boxTextClass')[0];
|
||||||
|
|
||||||
textInBox.style.color = 'blue';
|
textInBox.style.color = 'blue';
|
||||||
textInBox.style.margin = '25%';
|
textInBox.style.margin = '25%';
|
||||||
@@ -32,5 +32,130 @@ window.addEventListener("resize", function (){
|
|||||||
const varW = window.outerWidth;
|
const varW = window.outerWidth;
|
||||||
const varH = window.outerHeight;
|
const varH = window.outerHeight;
|
||||||
setSize(varW, varH);
|
setSize(varW, varH);
|
||||||
})
|
});
|
||||||
|
|
||||||
|
document.getElementById("textValueBtn").addEventListener('click', function(){
|
||||||
|
let textInBox = document.getElementById("boxTextID");
|
||||||
|
let changeText = document.getElementById("textValue").value;
|
||||||
|
|
||||||
|
|
||||||
|
if(changeText.length == 0)
|
||||||
|
{
|
||||||
|
alert("Text: Not a valid text for this action.")
|
||||||
|
}else{
|
||||||
|
textInBox.innerText = changeText;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById("textSizeBtn").addEventListener('click', function(){
|
||||||
|
let textInBox = document.getElementById("boxTextID");
|
||||||
|
let changeSize = document.getElementById("textSize").value;
|
||||||
|
|
||||||
|
if(!isNaN(changeSize))
|
||||||
|
{
|
||||||
|
alert("Size: Not a valid number for this action.")
|
||||||
|
}else{
|
||||||
|
textInBox.style.fontSize = changeSize+"px";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.getElementById("textAngleBtn").addEventListener('click', function(){
|
||||||
|
let textInBox = document.getElementById("boxTextID");
|
||||||
|
let changeAngle = document.getElementById("textAngle").value;
|
||||||
|
|
||||||
|
if(!isNaN(changeAngle))
|
||||||
|
{
|
||||||
|
alert("Angle: Not a valid number for this action.")
|
||||||
|
}else{
|
||||||
|
textInBox.style.transform = "rotate("+changeAngle+"deg)";
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById("startBinCalc").addEventListener('click', function(){
|
||||||
|
let dezNumberToBin1 = tryParseInt(document.getElementById("binValue1").value);
|
||||||
|
let dezNumberToBin2 = tryParseInt(document.getElementById("binValue2").value);
|
||||||
|
|
||||||
|
if(isNaN(dezNumberToBin1) || isNaN(dezNumberToBin2))
|
||||||
|
{
|
||||||
|
alert("BinaryNumberAddition: At least one number is not valid for this action.")
|
||||||
|
}else{
|
||||||
|
let bin1 = calcDezToBin(dezNumberToBin1);
|
||||||
|
let bin2 = calcDezToBin(dezNumberToBin2);
|
||||||
|
|
||||||
|
additionTwoBinNumbers(bin1, bin2);
|
||||||
|
|
||||||
|
|
||||||
|
document.getElementById('binCalcResult').innerText = bin1 + " - " + bin2;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
function calcDezToBin(dezNumber){
|
||||||
|
|
||||||
|
let tempNumber = dezNumber;
|
||||||
|
let remainderString = "";
|
||||||
|
|
||||||
|
let lastNumber = 0;
|
||||||
|
|
||||||
|
while(tempNumber != 0)
|
||||||
|
{
|
||||||
|
lastNumber = Math.floor(tempNumber/2);
|
||||||
|
remainderString += tempNumber%2;
|
||||||
|
tempNumber = lastNumber;
|
||||||
|
}
|
||||||
|
|
||||||
|
let binaryValue = flipBinString(remainderString);
|
||||||
|
return binaryValue;
|
||||||
|
//document.getElementById('binCalcResult').innerText = binaryValue;
|
||||||
|
}
|
||||||
|
|
||||||
|
function tryParseInt(str) {
|
||||||
|
let retValue = null;
|
||||||
|
if(str !== null) {
|
||||||
|
if(str.length > 0) {
|
||||||
|
if (!isNaN(str)) {
|
||||||
|
retValue = parseInt(str);
|
||||||
|
return retValue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return str;
|
||||||
|
}
|
||||||
|
|
||||||
|
function flipBinString(remainderString)
|
||||||
|
{
|
||||||
|
let count = remainderString.length;
|
||||||
|
let remainders = [count];
|
||||||
|
|
||||||
|
for(i = 0; i < count; i++)
|
||||||
|
{
|
||||||
|
remainders[i] = remainderString[i];
|
||||||
|
}
|
||||||
|
let returnVal = remainders.reverse().join('');
|
||||||
|
return returnVal;
|
||||||
|
}
|
||||||
|
|
||||||
|
function additionTwoBinNumbers(bin1, bin2)
|
||||||
|
{
|
||||||
|
let bin1Array = bin1.split("");
|
||||||
|
let bin2Array = bin2.split("");
|
||||||
|
let tempResult = "";
|
||||||
|
|
||||||
|
if(bin1Array.length < bin2Array.length)
|
||||||
|
for(i = 0; i < bin2Array.length; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
else
|
||||||
|
for(i = 0; i < bin1Array.length; i++)
|
||||||
|
{
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
+24
-8
@@ -15,36 +15,52 @@
|
|||||||
<div class="col-sm">
|
<div class="col-sm">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Text</span>
|
<span class="input-group-text">Text</span>
|
||||||
<input type="text" class="form-control" placeholder="Hello World">
|
<input type="text" id="textValue"class="form-control" placeholder="Hello World">
|
||||||
<button>Text ändern</button>
|
<button id="textValueBtn" class="btnColor">Text ändern</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm">
|
<div class="col-sm">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Schriftgröße</span>
|
<span class="input-group-text">Schriftgröße</span>
|
||||||
<input type="text" class="form-control" placeholder="Hello World">
|
<input type="text" id="textSize" class="form-control" placeholder="12">
|
||||||
<span class="input-group-text">px</span>
|
<span class="input-group-text">px</span>
|
||||||
<button>Schrift ändern</button>
|
<button id="textSizeBtn" class="btnColor">Schrift ändern</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-sm">
|
<div class="col-sm">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-text">Drechung</span>
|
<span class="input-group-text">Drechung</span>
|
||||||
<input type="text" class="form-control" placeholder="Hello World">
|
<input type="text" id="textAngle"class="form-control" placeholder="45">
|
||||||
<span class="input-group-text">°</span>
|
<span class="input-group-text">°</span>
|
||||||
<button>Drehung ändern</button>
|
<button id="textAngleBtn" class="btnColor">Drehung ändern</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br><br>
|
||||||
<div id="webBoxSel" class="container webBox">
|
<div id="webBoxSel" class="container webBox">
|
||||||
<span class="boxText">Das ist nur ein BeipielText</span>
|
<span id="boxTextID" class="boxTextClass">Das ist nur ein Beipieltext der geändert wird.</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<br><br><br><br>
|
||||||
|
|
||||||
|
<div class="input-group">
|
||||||
|
<span class="input-group-text">Dezimalzahl1:</span>
|
||||||
|
<input type="text" id="binValue1" class="form-control" placeholder="150">
|
||||||
|
|
||||||
|
<span class="input-group-text">Dezimalzahl2:</span>
|
||||||
|
<input type="text" id="binValue2" class="form-control" placeholder="150">
|
||||||
|
|
||||||
|
<button id="startBinCalc" class="btnColor">Binär addieren.</button>
|
||||||
|
</div>
|
||||||
|
<div id="binCalcResult">
|
||||||
|
asd
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="assets/js/manipulation.js"></script>
|
<script src="assets/js/manipulation.js"></script>
|
||||||
|
|||||||
Reference in New Issue
Block a user