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. Commented Apr 29, 2020 at 20:37
  • Where do you want your Python program to be executed? In the browser or in the server? Commented Apr 29, 2020 at 20:38

1 Answer 1

1

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

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.