<form
class="triviaQuestions"
action="/submitquestion1"
method='GET'
>
<div>
<label for="questionOne"><h4 style="text-align: center;
font-family:Verdana, Geneva, Tahoma, sans-serif;" >Question 1</h2>
<p class=questions>
What is the speed of sound?
<br>a)120km/h b)1,200 km/h
c)400km/h d)700km/h
</p>
</label>
<input type="text"
name="qOneAnswer"
class="textarea"
placeholder="Enter your answer"
size="200"
required/>
<input type="submit" value="SUBMIT" class="submitBtn" />
</div>
</form>
This is my HTML code
Also I have initialized my express, I just need help writing a code to process users input once submit button clicked and to display whether they got the correct answer/input or not.
const express = require("express");
const ejs= require("ejs");
const app = new express();
app.use(express.json());
app.use(express.urlencoded({extended:true}));
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.