add template func: Js

Signed-off-by: 商讯在线 <swhbox@foxmail.com>