It's in my hands to have a surjective function Let $f$ be any function $A \to B$.
By definition $f$ is a surjective function if $\space \forall y \in B \space \exists \space x \in A \space( \space f(x)=y \space)$.
So, for any function I only have to ensure that there doesn't "remain" any element "alone" in the set $B$. In other words, the range set of the function has to be equal to the codomain set.
The range depends on the function, but the codomain can be choose by me. So if I chose a codomain equal to the range I get a surjective function, regardless the function that is given.
M'I right? 
 A: Yes.
$f\colon \mathbb R\to \mathbb R$, $x\mapsto \sin x$ is not surjective, but $g\colon \mathbb R\to \mathbb [-1,1]$, $x\mapsto \sin x$ is.
They are therefore different maps and we see that specifying the codomain is important.
A: There are intrinsic properties and extrinsic properties. Being surjective is an extrinsic property. If you are not given a particular codomain you cannot conclude whether or not a function is surjective. 
Being injective, on the other hand, is an intrinsic property. It depends only on the function as a set of ordered pairs. 
A: There are two conventions on what "function" means.
Define functions $f : \mathbb{R} \to \mathbb{R}$ and $g : \mathbb{R} \to \mathbb{R}^{\geq}$ by $f(x) = x^2$ and $g(x) = x^2$. ($\mathbb{R}^{\geq}$ means the non-negative reauls)
In one convention, a function "is" nothing more than its graph. So $f$ and $g$ are the same function. It doesn't make sense to ask "is $f$ surjective?"; instead you have to ask questions like "is $f$ surjective onto $\mathbb{R}$?" (however, the target is often omitted because it is implied by context)
In the other convention, the domain and codomain are part of what the function "is". So $f$ and $g$ are different functions, because they have different codomains. It makes sense to ask if $f$ is surjective, and it is not, whereas $g$ is surjective.
IMO the second convention is a somewhat better notion, and I believe somewhat more common. 
