Some js codes