[js]add a default config object
fix id names