Test: Unterschied zwischen den Versionen

Aus LNTwww
Wechseln zu:Navigation, Suche
(Die Seite wurde neu angelegt: „<code> var a = 3; </code>“)
 
Zeile 1: Zeile 1:
<code>
+
<html>
var a = 3;
+
<head>
</code>
+
<script type="text/javascript">
 +
function foobar(val1, val2) {
 +
  var tst = document.getElementById("tst");
 +
  console.log(val1);
 +
  if (val1 == val2) {
 +
    tst.innerHTML = "true";
 +
  }
 +
  else {
 +
    tst.innerHTML = "false";
 +
  }
 +
};
 +
</script>
 +
</head>
 +
<body>
 +
<button class="button" onclick="foobar(false, false)">Test (false false)</button>
 +
<button class="button" onclick="foobar(false, true)" >Test (false true)</button>
 +
<button class="button" onclick="foobar(true,  false)">Test (true false)</button>
 +
<button class="button" onclick="foobar(true,  true)" >Test (true true)</button>
 +
<span id="tst">nothing so far</span>
 +
</body>
 +
</html>

Version vom 21. September 2017, 19:41 Uhr

nothing so far