some code for JavaScript！