Please use POST request in JSfiddle

后端 未结 1 1557

Whenever I run my code, I get the error {\"error\": \"Please use POST request\"} Does anyone know what this error means? My code in jsfiddle: http://jsfiddle.ne

相关标签:
1条回答
  • 2020-12-19 07:13
    document.forms.form.submit();
    

    This actually submits the <form>, you can't do that in jsFiddle1. Just remove that line, if you want to run the JavaScript, why are you submitting the form?

    1: You can, but not using a <form>. You can test AJAX, see the docs. You're getting the error "Please use POST request" because by default <form> use GET. jsFiddle doesn't like being sent a query string, so it gave that error. You can POST stuff to it, but nothing will happen.

    0 讨论(0)
提交回复
热议问题