49 lines
No EOL
1.6 KiB
HTML
49 lines
No EOL
1.6 KiB
HTML
<!doctype html>
|
|
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
<title>Hangman av Rolf</title>
|
|
<meta name="description" content="The HTML5 Herald">
|
|
<meta name="author" content="SitePoint">
|
|
|
|
<link rel="stylesheet" href="main.css">
|
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<h1>Hangman 2020 by Rolf Martin Glomsrud</h1>
|
|
<canvas id="myCanvas"></canvas>
|
|
<div class="guessField">
|
|
<h2>Guess letters:</h2>
|
|
<input type="text" id="myText" class="css-input" value="" onkeyup="if(event.keyCode===13) {event.preventDefault(); sjekkBokstav();}">
|
|
<input type="button" class="myButton" id="testKnapp" width="40px" height="40px" value="Test!" onclick="sjekkBokstav()">
|
|
</div>
|
|
<!--Div containing the field to guess the letters in the word-->
|
|
<div class="guessField">
|
|
<h2>Guess word:</h2>
|
|
<input type="text" class="css-input" id="myTextWord" onkeyup="if(event.keyCode===13) {event.preventDefault(); sjekkOrd();}">
|
|
<input type="button" class="myButton" id="testOrdKnapp" width="40px" height="40px" value="Test ord!" onclick="sjekkOrd()">
|
|
</div>
|
|
<!--Div containing the guessWord field-->
|
|
<div id="resultField">
|
|
<h2>Wrong letters guessed:</h2>
|
|
<p id="wrongLetters"></p>
|
|
<h2>Tries left:</h2>
|
|
<p id="tries"></p>
|
|
</div>
|
|
<!--the result field containing the guessed word -->
|
|
<div id="resultField1">
|
|
<h2>The word so far:</h2>
|
|
<p id="ord"></p>
|
|
|
|
</div>
|
|
<!-- containing if the user has won or lost after the game is over -->
|
|
<div id="resultField2">
|
|
<h2 id="result"></h2>
|
|
</div>
|
|
<script src="script.js"></script>
|
|
</body>
|
|
</html> |