Get Html Element Attribute Javascript Array Slice