there is a <input type="hidden" id="test1"> in my page, and i want to use JS to give it a long string consisting of numbers,which is like "454544878545455487",
when some button(<input type="button" onclick="testFunc();">) is clicked.
The testFunc is like followings:
<script type="text/javascript">
function testFunc()
{
document.getElementById("test1").setAttribute("value",somestring);
XXXX.submit();
}
</script>
when the somestring is short,such as "12345678",that's ok,
but when it is long,for example,"454544878545455487", the value appears like 4.54544878545455e+17 ,
so i add a .toString() ,
document.getElementById("test1").setAttribute("value",somestring.toString());
it is now a strange string like "454544878545455500"
approximately, but doesn't equal to "454544878545455487"...
VERY LATE NOW, AND THANKS VERY MUCH ~~