I'm trying to pass a parameter to a function in JavaScript. My function code for example:
function loadbigimage(parm){
and I'm calling with:
<a href='javascript:;' onclick='loadbigimage(0123);'></a>"
When I'm passing random parameters that not starts with a zero (like 2400) everything is fine and parameter is passed correctly and exactly as mentioned to the function. But when I'm passing parameter which starts with a zero like '0123' the parameter passed but without the first '0' digit, so finally the vale which passed is '123' and the first zero is deleted. How can I save this issue and pass the full parameter as it is? Maybe need to pass it as a string? How can I do that?
onclick='loadbigimage("0123");