show/hide this revision's text 2 added 48 characters in body

Edit[ The following is wrong ~ see comments]

I don't think so.

Suppose $f$ to be surjective. Let $x\mapsto 0$ and $y\mapsto 1$. Now consider two distinct paths $\gamma,\eta:[0,1]\to\mathbb Q\times\mathbb Q$ from $x$ to $y$. Since $f$ is continuous it maps these paths surjectively onto $[0,1]$ (more exactly $[0,1]\subset f\gamma([0,1])$ and $[0,1]\subset f\eta([0,1])$). Thus, $f$ cannot be injective.

show/hide this revision's text 1

I don't think so.

Suppose $f$ to be surjective. Let $x\mapsto 0$ and $y\mapsto 1$. Now consider two distinct paths $\gamma,\eta:[0,1]\to\mathbb Q\times\mathbb Q$ from $x$ to $y$. Since $f$ is continuous it maps these paths surjectively onto $[0,1]$ (more exactly $[0,1]\subset f\gamma([0,1])$ and $[0,1]\subset f\eta([0,1])$). Thus, $f$ cannot be injective.