On the problem that the js variable has not changed

problem description

I defined a global variable on the index.html page, and then introduced a js file at the bottom of the page.
I put a button on the index.html page, and I clicked it to change the value of the variable.
is then handed over to a function in the imported js file to determine the variable. If it is a certain value, a different response occurs, but the variable in the js file is always the default value at initialization. What"s going on?

Apr.19,2022

look at the word guessing code series. In general, you first locate the problem to see if the event is triggered ( log ), and then see if any variables with the same name are overridden first.


No code to say e


debug, boy. You can tell at a glance what went wrong

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3ae0b-2c256.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3ae0b-2c256.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?