Tag: JavaScript
-
Post Views: 16 Recently, I have encountered a small problem that affects efficiency when sorting out the blog writing process. Although it only takes a few more clicks at a time, since I write a technical blog almost every day, this repetitive operation has become a place worth optimizing in the long run. In the end, I realized by analyzing…
-
Post Views: 18 1. Reference: In Refactoring: Improved Design of Existing Code (2nd Edition), build the test system – the writing of the sample code to be tested:https://www.shuijingwanwq.com/2023/01/28/7368/. The problem now is that multiple classes exist in the same file. Decided to split, each class forms a separate file. 2. Create a new class file /modules/producer.js, and migrate the class…
-
Post Views: 15 Since it is necessary to determine whether a value exists in this PHP array in JavaScript, you need to pass this PHP array into JavaScript! This effect can be achieved by using JSON-encoded variables using JSON_ENCODE – JSON encoded! Finally, use $.inArray(item.gid, js_goods_ids) == -1 to determine whether the value of this js variable exists in…
