get attribute using js