submitting a GET form with query string params and hidden params disappear

前端 未结 10 692
庸人自扰
庸人自扰 2020-11-22 02:22

Consider this form:

10条回答
  •  遥遥无期
    2020-11-22 03:01

    Your construction is illegal. You cannot include parameters in the action value of a form. What happens if you try this is going to depend on quirks of the browser. I wouldn't be surprised if it worked with one browser and not another. Even if it appeared to work, I would not rely on it, because the next version of the browser might change the behavior.

    "But lets say I have parameters in query string and in hidden inputs, what can I do?" What you can do is fix the error. Not to be snide, but this is a little like asking, "But lets say my URL uses percent signs instead of slashes, what can I do?" The only possible answer is, you can fix the URL.

提交回复
热议问题