I want to send the input from id="question" and id="answer" to a javascript file to a json file and I want to store multiple questions with their answers , I don't know how to do that could anyone help
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Study App</title>
<link rel="stylesheet" href="style.css">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link
href="https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap"
rel="stylesheet">
</head>
<body>
<form action="">
<label class="Question_text" for="question">Question</label>
<input class="Question_input" id="question" placeholder="Enter your question" required>
<label class="answer_text" for="answer">Answer</label>
<input class="answer_input" id="answer" placeholder=" Enter your answer" required>
<button class="Reset_btn" type="reset">Clear Fields</button>
<button class="enter_question" type="submit">Enter Question</button>
</form>
<script src="index.js"></script>
</body>
</html>
action. But you didn't define any and you didn't better explain what you wish to do. You probably need a server side action in charge of processing those requests but your question is too vague so far