jeudi 26 mars 2020

How to create html form that directly goes to specific search on a website?

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.




Aucun commentaire:

Enregistrer un commentaire