Test: Unterschied zwischen den Versionen
Aus LNTwww
Tasnad (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „<code> var a = 3; </code>“) |
Tasnad (Diskussion | Beiträge) |
||
Zeile 1: | Zeile 1: | ||
− | < | + | <html> |
− | var | + | <head> |
− | </ | + | <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