title: Create an event handler for the submit button
body: <p>I want to make an event handler for the button, which will change the background color.</p>
  
  <p>This my code</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code> &lt;!DOCTYPE html&gt;
      &lt;html lang="en" dir="ltr"&gt;
        &lt;head&gt;
          &lt;meta charset="utf-8"&gt;
          &lt;title&gt;Flask Tutorial&lt;/title&gt;
        &lt;/head&gt;
        &lt;body&gt;
          &lt;h1&gt; My First Try Using Flask &lt;/h1&gt;
          &lt;p&gt; Flask is Fun &lt;/p&gt;
           &lt;form method="post"&gt;
          &lt;input  type="submit" name="red" value ="red" &gt;
           &lt;/form&gt;
        &lt;/body&gt;
      &lt;/html&gt;
  </code></pre>
  
  <p><strong>Flask</strong></p>
  
  <pre><code>from flask import Flask, render_template
  app = Flask(__name__)
  @app.route("/")
  def home():
      red  = request.form("background-color:red;")
      return render_template("home.html")
  
  if __name__ == "__main__":
      app.run(debug=True)
  </code></pre>
  
  <p>How do I set an even handler for a button click in Flask?</p>