use javascript to local