Quantcast
Channel: Active questions tagged html - Stack Overflow
Viewing all articles
Browse latest Browse all 72473

HTML form submit adding flag into URL

$
0
0

I have a simple html form. When the form is submitted, the page is refreshed and the input is appended to the url.

<form>
     <input name="q" type="text" />
</form>

For example, the original URL is:

file:///Users/Download/dd.html

When the form is submitted, the URL becomes

file:///Users/Download/dd.html?q=ccc

I want to add a flag to let the backend knows where the request is from. Is it possible to add a flag into the header?

If not, I want to add &global to the end of the URL, so the url becomes file:///Users/Download/dd.html?q=ccc&global I tried to set the value of the input, but it will change what displayed in the page.

I am wondering if it is possible to add a flag into header, so my backend java code can handle it. Or, add the flag to the end of the URL.

Thanks a lot!


Viewing all articles
Browse latest Browse all 72473

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>