Question: > 
> In class we learned the number of functions from an $m$-element set to an $n$-element set is $n^{m}$. So this answer should be $5^{3}$? 
> 
> 
> 

I just need confirmation if my answer is correct, if not explain to me why it's not.

Answer: 
**hint**

From the total number of functions $3^5$ subtract the number of functions which are NOT onto. Suppose your target set is $\{a,b,c\}$. Then 

1. There are only $3$ functions with range as singletons, for example everything mapping to $a$.
2. Now count the number of functions whose range is **of the form** $\{a,b\}$. This will be $3(2^5-2)=90$ (Think why?).

In general, inclusion-exclusion principle is used for such problems.
When talking about functions, the word 'onto', which you used in the title of the question, has a specific technical meaning (it means the function is 'surjective'). If this is what you meant then the other responses give the answer.

If you were just using 'onto' to mean the same as 'to', then the only problem with your answer is that you swapped the roles of $n$ and $m$, so the answer should be $3^5$. (You can see this, as each of the five elements has a choice of three things the function can send it to, so there are $3\times 3\times 3\times 3\times 3$ possible choices.)