Update common.js

Constructing HTML through JavaScript will be much easier.