0

When I run the HTML page then my PYTHON Program must be called after clicking the button.

<html>
    <head>
        <script type="text/javascript" language = "javascript">
            function clicked()
            {
                // call python program
            }
        </script>
    </head>
    <body>
        <input type="button" onclick = "clicked()" id="b1">
    </body>
</html>

Python Programs:

print("Hii")
2
  • 2
    You can use Ajax to do this, send request to a Python backend (use a framwork like Flask for example) where the request is handled.
    – Tibbelit
    Commented Apr 29, 2020 at 20:37
  • Where do you want your Python program to be executed? In the browser or in the server?
    – D. Pardal
    Commented Apr 29, 2020 at 20:38

1 Answer 1

1

You may want to send a request to an endpoint implemented by Python.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.