<a href='javascript:void(0)' onclick='show($ID);'>ID</a>
my $ID is 0000001000.
what my show() function gets is 512 instead of 0000001000
I have tried cast $ID to string using String() and .toString() but still i do a alert() it returns me 512.
i read something about octal mode. how can i prevent or correct this ?
i want my function to read 0000001000
You should pass it as a string:
Otherwise it is automatically cast from octal to decimal notation as
oct(1000) === dec(512).