simple code by javascript.