title: Canvas trouble changing color/clearing canvas on button click
body: <p>My code is using a canvas that allows people to draw whatever they want, what I'm trying to implement is changing the color of what their coloring on button click, default color is black I have two buttons to change ot red and green and also a clear canvas button, none of these seems to operate on button click however.</p>
  
  <pre><code>&lt;h3&gt;Draw Something&lt;/h3&gt;
  &lt;!DOCTYPE html&gt;
  
  &lt;html lang="en"&gt;
  &lt;head&gt;
     &lt;meta charset="utf-8"&gt;
     &lt;title&gt;Paint Canvas&lt;/title&gt;
     &lt;style type="text/css"&gt;
     &lt;!--
       #container { position: relative; }
       #imageView { border: 1px solid #000; }
     --&gt;
     &lt;/style&gt;
  
  &lt;/head&gt;
  
  &lt;body&gt;
  
      &lt;div id="container"&gt;
          &lt;canvas id="imageView" width="600" height="300"&gt;
                 &lt;/p&gt;
          &lt;/canvas&gt;
      &lt;/div&gt;
  
      &lt;script type="text/javascript" src=".js"&gt;&lt;/script&gt;
  
  &lt;/html&gt;
  
  &lt;body &gt;
      &lt;input type= "button" value= "Green" id= "green" onclick= "GreenRect()" /&gt;
  
      &lt;input type= "button" value= "Red" id= "red" onclick= "RedRect()" /&gt;
  
          &lt;input type= "button" value= "clear canvas" 
                   id= "clear" onclick= "ImgClr()" /&gt;
  
  
          &lt;button id="howdy"&gt;Howdy!&lt;/button&gt;&lt;br&gt;
  &lt;/body&gt;
      function GreenRect () {
          context.strokeStyle= 'green';
          context.stroke();
          }
  
          function RedRect () {
          context.strokeStyle= 'red';
          context.stroke();
          }
  
          function ImgClr () {
          context.clearRect(0,0, 600, 300);  
          }
          &lt;/script&gt;
  </code></pre>