0
<script>
  

    document.addEventListener("DOMContentLoaded", function () {
    document.getElementById("Name").value = profileInformation.Name;
    document.getElementById("email").value = profileInformation.email;
});
</script>
<form action="/users/student/update" method="POST">
    <div class="personal">
        <label for="Name" class="d">Name :</label>
        <input id="Name" type="text"  name="Name">
        <hr>
        <label for="email" class="e">Email :</label>
        <input id="email" type="email" name="email">
        <hr>
    </div>
    <hr style="border: 2px solid black;">
    <hr style="border: 2px solid black;">
    <input class="btn" type="submit" value="Submit">
</form>

我从后端获取数据:

 res.render('users/studentEditProfile',{profileInformation: profileInformation})

我希望“姓名”和“电子邮件”作为默认值,但由于某种原因没有发生。我没有从后端代码获得输出。请帮忙

4

0 回答 0