identifier with "." not work in javascript selectors

In javascript (or CSS), it's impossible to access to an element with id "#foo.bar" because, it's understand like "element with id #foo and class .bar"