我是NODEJS的初学者。我试图在呈现到新页面之前在浏览器上显示警报消息。我无法这样做。你能指导我吗?
<form id="form1" action="/emp_details" method="post">
<label for="NAME_FIELD">NAME</label>
<input id="NAME_FIELD" type="text" name="NAME_FIELD" autocomplete="off">
<br><br>
<label for="EMAIL_FIELD">EMAIL</label>
<input id="EMAIL_FIELD" type="text" name="EMAIL_FIELD" autocomplete="off">
<br><br>
<label for="GENDER">GENDER</label>
<select
id="GENDER" name="GENDER">
<option value="male">MALE</option>
<option value="female">FEMALE</option>
<option value="others">OTHERS</option>
</select><br><input type="submit" value="submit">
</form>
app.get('/', (req, res) => {
res.render('home');
})
app.post('/emp_details', function (req, res) {
console.log(req.body);
//SOMETHING HERE TO ALERT
res.render('/emp_details')
});