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.
<html>
<head>
<script type="text/javascript">
function Ein()
{
var klima = (:="Daten_DB".Ein_Klima:);
klima = true;
}
</script>
</head>
<body>
<!-- AWP_In_Variable Name='"Daten_DB".EIN_Klima'-->
<form method="post">
<input type="button" value="Einschalten" onmousedown="Ein()">
</form>
</body>
</html>
Das ist Serverseitiger Code. WEBI ignoriert meinen Hinweis, dass dieser für eine JS Frage nicht hilfreich ist :(Was soll das bezwecken:
Was soll denn funktionieren?Vom Grundgedanken her sollte es doch so funktionieren, nur leider tut es das noch nicht :-)
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>New</title>
<script type="text/javascript">
var blub = 0;
window.onload = function () {
window.setInterval(function () {
if (blub === 1) {
document.getElementById('display').style.backgroundColor = '#0f0';
} else {
document.getElementById('display').style.backgroundColor = '#f00';
}
}, 50);
document.getElementById('switcher').onmousedown = function () {
blub = 1;
};
document.getElementById('switcher').onmouseup = function () {
blub = 0;
};
document.getElementById('switcher').onmouseout =
document.getElementById('switcher').onmouseup;
};
</script>
</head>
<body>
<div id="display"> </div>
<p><input type="button" id="switcher" value="click and hold" /></p>
</body>
</html>
Und wo ist dann das Ereignis "lasse wieder los"?es sollte so funktionieren.
So lange der Button, gedrückt wird, soll ein Bit gesetzt werden in einer Variablen. Lasse ich wieder los, soll es nicht mehr gesetzt werden.