<script>
      function draw_rectangle() {
        var rand_x = Math.random() * 200
        var rand_y = Math.random() * 200
        var rand_w = Math.random() * 20 + 2
        var rand_h = Math.random() * 20 + 2
        var rand_color = '#' + (Math.random() * 0xFFFFFF | 0).toString(16);

        var canvas = document.getElementById("draw_area").getContext("2d")
        canvas.fillStyle = rand_color
        canvas.fillRect(rand_x, rand_y, rand_w, rand_h)
      }
    </script>