Commit 8e78231b by Patryk Czarnik

kalkulatorek - start

parent ffef3d90
package com.example.demo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
@Controller
public class Kalkulatorek {
@RequestMapping("/kalkulatorek")
public String dzialaj() {
return "kalkulatorek.html";
}
}
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta charset="UTF-8">
<title>Kalkulatorek</title>
<link rel="stylesheet" type="text/css" th:href="@{/styl.css}" href="../static/styl.css">
</head>
<body>
<h1>Kalkulatorek z zajęć</h1>
<form class="kalkulator">
<input type="number" name="liczba1">
<select name="operacja">
<option value="+">+</option>
<option value="-">-</option>
<option value="*">*</option>
<option value="/">/</option>
</select>
<input type="number" name="liczba2">
<br>
<button>Oblicz</button>
</form>
<div class="wynik">
[[${wynik}]]
</div>
</body>
</html>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment