index.ejs 662 B

123456789101112131415161718192021222324
  1. <html>
  2. <head>
  3. <title>Voting app</title>
  4. </head>
  5. <body>
  6. <p>Vote now!</p>
  7. <form action="/vote" method="post">
  8. <div>
  9. <label for="sandwiches-button">Sandwiches</label>
  10. <input name="yourVote" id="sandwiches-button" type="radio" value="sandwiches" />
  11. </div>
  12. <div>
  13. <label for="tacos-button">Tacos</label>
  14. <input name="yourVote" id="tacos-button" type="radio" value="tacos" />
  15. </div>
  16. <input type="submit" name="submit" id="submit" value="Vote!" />
  17. </form>
  18. <ul>
  19. <li>Sandwiches: <%= votes.sandwiches %></li>
  20. <li>Tacos: <%= votes.tacos %></li>
  21. </ul>
  22. </body>
  23. </html>