Change HTML input tags to use HTML5 syntax. (#1617)
In XHTML, the <input> tag must be properly closed, like this `<input />`. In HTML5 the `<input>` tag has no ending slash. https://www.w3schools.com/tags/tag_input.asp
This commit is contained in:
parent
8fb21a8bef
commit
6f7fe487b3
@ -824,12 +824,12 @@ form.html
|
|||||||
<form action="/" method="POST">
|
<form action="/" method="POST">
|
||||||
<p>Check some colors</p>
|
<p>Check some colors</p>
|
||||||
<label for="red">Red</label>
|
<label for="red">Red</label>
|
||||||
<input type="checkbox" name="colors[]" value="red" id="red" />
|
<input type="checkbox" name="colors[]" value="red" id="red">
|
||||||
<label for="green">Green</label>
|
<label for="green">Green</label>
|
||||||
<input type="checkbox" name="colors[]" value="green" id="green" />
|
<input type="checkbox" name="colors[]" value="green" id="green">
|
||||||
<label for="blue">Blue</label>
|
<label for="blue">Blue</label>
|
||||||
<input type="checkbox" name="colors[]" value="blue" id="blue" />
|
<input type="checkbox" name="colors[]" value="blue" id="blue">
|
||||||
<input type="submit" />
|
<input type="submit">
|
||||||
</form>
|
</form>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
@ -79,19 +79,19 @@
|
|||||||
<label class="sr-only" for="chat-message">Message</label>
|
<label class="sr-only" for="chat-message">Message</label>
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<div class="input-group-addon">{{.nick}}</div>
|
<div class="input-group-addon">{{.nick}}</div>
|
||||||
<input type="text" name="message" id="chat-message" class="form-control" placeholder="a message" value="" />
|
<input type="text" name="message" id="chat-message" class="form-control" placeholder="a message" value="">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<input type="submit" class="btn btn-primary" value="Send" />
|
<input type="submit" class="btn btn-primary" value="Send">
|
||||||
</form>
|
</form>
|
||||||
{{else}}
|
{{else}}
|
||||||
<form action="" method="get" class="form-inline">
|
<form action="" method="get" class="form-inline">
|
||||||
<legend>Join the SSE real-time chat</legend>
|
<legend>Join the SSE real-time chat</legend>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<input value='' name="nick" id="nick" placeholder="Your Name" type="text" class="form-control" />
|
<input value='' name="nick" id="nick" placeholder="Your Name" type="text" class="form-control">
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group text-center">
|
<div class="form-group text-center">
|
||||||
<input type="submit" class="btn btn-success btn-login-submit" value="Join" />
|
<input type="submit" class="btn btn-success btn-login-submit" value="Join">
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{{end}}
|
{{end}}
|
||||||
|
@ -35,9 +35,9 @@ var html = template.Must(template.New("chat_room").Parse(`
|
|||||||
<h1>Welcome to {{.roomid}} room</h1>
|
<h1>Welcome to {{.roomid}} room</h1>
|
||||||
<div id="messages"></div>
|
<div id="messages"></div>
|
||||||
<form id="myForm" action="/room/{{.roomid}}" method="post">
|
<form id="myForm" action="/room/{{.roomid}}" method="post">
|
||||||
User: <input id="user_form" name="user" value="{{.userid}}"></input>
|
User: <input id="user_form" name="user" value="{{.userid}}">
|
||||||
Message: <input id="message_form" name="message"></input>
|
Message: <input id="message_form" name="message">
|
||||||
<input type="submit" value="Submit" />
|
<input type="submit" value="Submit">
|
||||||
</form>
|
</form>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
Loading…
Reference in New Issue
Block a user