Generate a Clickable Grid

Write Javascript programs to generate a clickable grid like a sample screenshot below: