GitHub Pages URL parameters and input

I have textbox input (for URLs) in index.html and I want to make so that you could set the value of input in URL like this: (or something like that). Is it possible?

1 Like

you mean a textbox with a default text ?

check this out

No, I don’t mean default value. I learned that I need <form> in my code. I did so, but it doesn’t work. I wrote and everything looked fine but in textbox (name is ourl) didn’t have value.

So you want to fill the text input element with some part of the URL? You’ll probably have to work with a bit of Javascript for that.

See: Document.URL - Web APIs | MDN

Thank you! I got it working.

1 Like