0

I know that the code below will go to the result page of google when the user types some texts and the submit button is clicked.

<!DOCTYPE html>

<html lang="en">
    <head>
        <title>
            Hello!
        </title>
    </head>
    <body>
        <form action="https://www.google.com/search" method="get">
            <input name="q" type="text">
            <input type="submit" value="Submit Form">
        </form>
    </body>
</html>

But I try this with https://www.jitta.com/. It does not seem to have the same structure as google. When searching on this website the url will be https://www.jitta.com/stock/bkk:ptt where "ptt" is the word that I want to search. Unlike google, if I want to search "ptt" the url will be https://www.google.com/search?q=ptt.

Can it be only HTML code? no other parts involved (like Javascript,...)

Appreciate anyone who answers this.

Boonboy
  • 31
  • 2
  • 5
  • No. HTML forms on their own can only send `GET` and `POST` HTTP requests. The url required by jitta.com will require javascript to be formed. – Noah Boegli Mar 26 '20 at 10:05
  • as far as I knew it's not possible with only HTML, you can try this answer and apply any formatting you want https://stackoverflow.com/a/50861534/2312387 – Sherif Abdelkhaliq Mar 26 '20 at 10:08

0 Answers0