Puzzle with JavaScript. Games proposal

I have made a Huarongdao game long ago: