当前位置:网站首页>When JS method passes long type ID value, precision loss will occur
When JS method passes long type ID value, precision loss will occur
2022-07-05 20:13:00 【Earthy taste~】
such as :onclick="test(1543401283015196673)"
The parameters passed are 1543401283015196673, And in the js When received in the method, it will become 1543401283015196700, The last three 673, After rounding , Turned into 700
This pit wasted me hours , Tested repeatedly , Only to find out . Make a note of .
resolvent :
hold Long Type to string , Put quotes ;
onclick="test('1543401283015196673')"
thymeleaf Write it correctly :th:onclick="|test('${user.getId()}')|";
Both of the following are wrong :
th:onclick="'test('+${''+user.getId()}+')'"th:onclick="'test('+${user.getId().toString()}+')'"
边栏推荐
- [quick start of Digital IC Verification] 7. Basic knowledge of digital circuits necessary for verification positions (including common interview questions)
- y57.第三章 Kubernetes从入门到精通 -- 业务镜像版本升级及回滚(三十)
- How to retrieve the root password of MySQL if you forget it
- Thread pool parameters and reasonable settings
- 信息学奥赛一本通 1338:【例3-3】医院设置 | 洛谷 P1364 医院设置
- 95后阿里P7晒出工资单:狠补了这个,真香...
- 【数字IC验证快速入门】1、浅谈数字IC验证,了解专栏内容,明确学习目标
- 信息学奥赛一本通 1340:【例3-5】扩展二叉树
- leetcode刷题:二叉树13(相同的树)
- 图嵌入Graph embedding学习笔记
猜你喜欢

Zero cloud new UI design

leetcode刷题:二叉树15(找树左下角的值)

Fundamentals of deep learning convolutional neural network (CNN)

Parler de threadlocal insecurerandom

leetcode刷题:二叉树16(路径总和)

.Net分布式事務及落地解决方案

实操演示:产研团队如何高效构建需求工作流?

【数字IC验证快速入门】9、Verilog RTL设计必会的有限状态机(FSM)

Debezium series: record the messages parsed by debezium and the solutions after the MariaDB database deletes multiple temporary tables

解决php无法将string转换为json的办法
随机推荐
Unity editor extended UI control
Database logic processing function
[C language] string function and Simulation Implementation strlen & strcpy & strcat & StrCmp
银河证券在网上开户安全吗?
SecureRandom那些事|真伪随机数
Scala basics [HelloWorld code parsing, variables and identifiers]
sort和投影
Debezium series: PostgreSQL loads the correct last submission LSN from the offset
About the priority of Bram IP reset
selenium 元素信息
ACM getting started Day1
[C language] three implementations of quick sorting and optimization details
leetcode刷题:二叉树15(找树左下角的值)
Reinforcement learning - learning notes 4 | actor critical
Oracle-表空间管理
Guidelines for application of Shenzhen green and low carbon industry support plan in 2023
Is it safe for CICC fortune to open an account online?
leetcode刷题:二叉树18(最大二叉树)
深度學習 卷積神經網絡(CNN)基礎
What is PyC file