【问题标题】:how to make data from a html form go into a api link url using an api url如何使用 api url 使来自 html 表单的数据进入 api 链接 url
【发布时间】:2022-11-10 18:59:37
【问题描述】:

创建一个带有在线电子邮件输入和提交按钮的表单。 确保表单的数据转到此 url https://documenter.getpostman.com/view/20469527/2s83tCKYGN

我尝试并创建了一个 html 表单并使用 css 美化它,但无法将表单中的数据链接到给定的 api url

【问题讨论】:

    标签: javascript html css


    【解决方案1】:

    document.getElementById("form").onsubmit = e=>e.preventDefault()
    <form id="form" action="https://documenter.getpostman.com/view/20469527/2s83tCKYGN" method="post"><input type="email" name="email"
            ><input type="submit" value="Submit"></form>

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-01-23
      • 1970-01-01
      • 2015-12-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多