Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title></title>
- <script src="jquery-1.11.2.js"></script>
- <script>
- $(function() {
- $('#chek').click(function () {
- if ($(this).attr('checked')) {
- $("#btnSubmit").html("true");
- }
- else {
- $("#btnSubmit").html("false");
- }
- });
- });
- </script>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- </head>
- <body>
- <div>
- <form method="post">
- <input type="checkbox" id = "chek" name="readAlread" value="true"> true
- <input type="checkbox" name="readAlread" value="false"> false
- <br>
- <br>
- <input id ="btnSubmit" type="submit" value="submit" onclick="chek">Добавить
- </form>
- </div>
- </body>
- </html>
- @PostMapping("/add")
- public String add(@RequestParam Boolean readAlready, Map<String, Object> model) {
- ......
- return "main";
- }
- Whitelabel Error Page
- This application has no explicit mapping for /error, so you are seeing this as a fallback.
- Sat May 26 20:09:56 MSK 2018
- There was an unexpected error (type=Bad Request, status=400).
- Required Boolean parameter 'readAlready' is not present
Add Comment
Please, Sign In to add comment