在我的 appjs 项目中,我显示了一个网页,其中包含以下表单。当用户提交此表单时,我收到内部服务器错误。你能告诉我如何在我的 app.js 中处理这个 /submit_pariring_code 请求吗?
我可以在 javascript 代码中处理此表单提交,但这将使我在服务器端允许跨域(我不想这样做。)
<form class="form-signin" action="/submit_pairing_code">
<h3 class="form-signin-heading">Please enter your Pairing Code</h3>
<input type="text" name="pairing_code" class="input-block-level" placeholder="Pairing Code">
<br/>
<input type="text" name="computer_name" class="input-block-level" placeholder="Your Computer Name">
<br/>
<button class="btn btn-large btn-primary" type="submit">Submit</button>
</form>