I know that there are injective functions from $\mathbb{R}$ to $(0,1)$ that take all the values in $(0,1)$ for one $x$ (that is, with image $(0,1)$). For example this one:
$$f(x)=\frac{e^x}{e^x+1}, \ \ x\in\mathbb{R}$$
But I can't think of an injective function defined in $\mathbb{R}$ that has $[0,1]$ as its image. Does such a function exist and if not, why?