Jump to content

qszhc123

New Members
  • Posts

    8
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

qszhc123's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Thanks a lot~~ it's obvious that i should use ' ', and i just made a simple mistake!
  2. 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 ~~
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.