当前位置:网站首页>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()}+')'"
边栏推荐
- 股票开户哪里好?网上客户经理开户安全吗
- Based on vs2017 and cmake GUI configuration, zxing and opencv are used in win10 x64 environment, and simple detection of data matrix code is realized
- leetcode刷题:二叉树10(完全二叉树的节点个数)
- [quick start of Digital IC Verification] 6. Quick start of questasim (taking the design and verification of full adder as an example)
- ICTCLAS用的字Lucene4.9捆绑
- 95后阿里P7晒出工资单:狠补了这个,真香...
- Oracle tablespace management
- Flume series: interceptor filtering data
- 1: Citation;
- 基础篇——配置文件解析
猜你喜欢
leetcode刷题:二叉树17(从中序与后序遍历序列构造二叉树)
图嵌入Graph embedding学习笔记
Oracle-表空间管理
S7-200smart uses V90 Modbus communication control library to control the specific methods and steps of V90 servo
Solve the problem that the database configuration information under the ThinkPHP framework application directory is still connected by default after modification
leetcode刷题:二叉树11(平衡二叉树)
Win10 x64环境下基于VS2017和cmake-gui配置使用zxing以及opencv,并实现data metrix码的简单检测
【数字IC验证快速入门】3、数字IC设计全流程介绍
无卷积骨干网络:金字塔Transformer,提升目标检测/分割等任务精度(附源代码)...
Oracle tablespace management
随机推荐
Convolution free backbone network: Pyramid transformer to improve the accuracy of target detection / segmentation and other tasks (with source code)
浅浅的谈一下ThreadLocalInsecureRandom
Hong Kong stocks will welcome the "best ten yuan store". Can famous creative products break through through the IPO?
【数字IC验证快速入门】3、数字IC设计全流程介绍
怎么挑选好的外盘平台,安全正规的?
【c语言】归并排序
Leetcode(347)——前 K 个高频元素
Solve the problem that the database configuration information under the ThinkPHP framework application directory is still connected by default after modification
Go language | 02 for loop and the use of common functions
图嵌入Graph embedding学习笔记
【数字IC验证快速入门】6、Questasim 快速上手使用(以全加器设计与验证为例)
MySql的root密码忘记该怎么找回
Leetcode skimming: binary tree 10 (number of nodes of a complete binary tree)
Database logic processing function
C language OJ gets PE, OJ of ACM introduction~
B站UP搭建世界首个纯红石神经网络、基于深度学习动作识别的色情检测、陈天奇《机器学编译MLC》课程进展、AI前沿论文 | ShowMeAI资讯日报 #07.05
c——顺序结构
S7-200smart uses V90 Modbus communication control library to control the specific methods and steps of V90 servo
Leetcode(695)——岛屿的最大面积
Oracle tablespace management