identifier with "." not work in CSS/javascript selectors

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