Pass parameter to javascript function onclick. Improve this question.