Reference: https://jingyan.baidu.com/article/fcb5aff7f91f9fadab4a7172.html
In JavaScript or jQuery, you can multiply the obtained string number by 1 to convert it to an integer type . In other words, if you want to automatically convert a number of string type to an integer type, just multiply it by 1.
Sample code: