add js and bug fix
Merge pull request #162 from marsqing/master

add js