title: How to display text on the web page using python and HTML
body: <p>I have very simple web page example read from html file using python. the html called led.html as in bellow:</p>
  
  <pre><code>&lt;html&gt;
  &lt;body&gt;
  &lt;br&gt;
  &lt;p&gt;
  &lt;p&gt;
  &lt;a href="?switch=1"&gt;&lt;img src="images/on.png"&gt;&lt;/a&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>and the python code is:</p>
  
  <pre><code>import cherrypy
  import os.path
  import struct
  class Server(object):
      led_switch=1 
      def index(self,  switch=''):
          html = open('led.html','r').read()
          if switch:
              self.led_switch = int(switch)             
              print "Hellow world"            
          return html
      index.exposed = True
  
  conf = {
          'global' : { 
              'server.socket_host': '0.0.0.0', #0.0.0.0 or specific IP
              'server.socket_port': 8080 #server port
          },
  
          '/images': { #images served as static files
              'tools.staticdir.on': True,
              'tools.staticdir.dir': os.path.abspath('images')
          },
  
          '/favicon.ico': {  #favorite icon
              'tools.staticfile.on': True,  
              'tools.staticfile.filename': os.path.abspath("images/bulb.ico")
          }
      }
  cherrypy.quickstart(Server(), config=conf)
  </code></pre>
  
  <p>The web page contain only one button called "on", when I click it I can see the text "Hello World " display on the terminal.
  My question is how to make this text display on the web page over the "on" button after click on that button?
  Thanks in advance.</p>