Hide ID card information with js in the project, and hide ID card with js
Some Characters of the ID card are hidden through js in the project. The implementation of the computer version is to intercept the page. Now, the mobile version is used and you want to put the string in the background for operations, however, to ensure the consistency between the mobile and PC versions, you can use the following JavaScript code to write ftl pages:
<Html> <body> <script type = "text/javascript"> var html = '123456789abcdefghi'; var uw = html. replace (/(\ w)/g, function (a, B, c, d) {return (c> 1 & c <6) | c> (html. length-5 ))? '*': A}); document. write (uw); // The printed string 12 ***** 789abcde ***** </script> </body>
Replace:
\ W indicates that it is used to match letters, numbers, and underline characters (but I have read an article that says that if a is in Russian, it can escape verification)
G indicates whether to replace the string globally. If not, only the first matched string is replaced.
Function (a, B, c, d) respectively indicates:
Matched string, variable value, matched string position in the original string (starting from 0), original string
======================================
Where do function (a, B, c, d) js parameters come from?
I searched the internet for half a day and found it an official Parameter definition. The test results for parameters are as follows: