0

I have a program that needs has an HTML button. I need it to execute a python function when it is clicked. The function doesn't change anything on the webpage other than rerouting to another page. How do I do this?

HTML Button

    <div>
    <button class="submit-btn success"><a href="/end">Press after submission</a></button>
    </div>

Python Function

def PyFunc():
   df = pd.DataFrame(data)
   print(df)
3
  • 1
    from where do you get the data ? and paste your flask code. Commented Oct 22, 2020 at 5:56
  • 1
    Does this answer your question? call python function from html code Commented Oct 22, 2020 at 6:01
  • know that doesn't answer my question. Sorry. Commented Oct 23, 2020 at 3:51

0

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.