Today, I want to save the three scripts on a user registration page that I debugged yesterday into a file, create a folder, put them in it, and then call it. This makes the page look much cleaner, it is also convenient to debug and modify later, so you do not need to pull the scroll bar up and down.
After all the changes, refresh the registration page and find that all scripts do not work! All indicate errors such as undefined function! This is an inexplicable error. The script has been debugged. I know that this person often makes some careless low-level errors, so check the file name and path. That's right! The results of online queries are caused by lower-level errors (such as Chinese equals signs). None of them is similar to me.
Click root smoke meditation, check everything and read everything. The only thing that you don't pay attention to is the new folder. For ease of management, I gave it the name "scripts ...... I copied the three JS files to the root directory for calling. Everything is OK! It's okay to copy it to another folder! Create a new "scripts" folder under this folder and copy it to call it. This is also normal! Create a new folder under the root directory, name it "script", and copy it to call it. It is also normal! The script in the "scripts" folder is called again, and it is invalid again ......
At this point, it turns out that the "scripts" folder under the root directory is a problem. It seems that the scripts folder under the root directory cannot be used, but why can it be said everywhere on the Internet? Is it because I set the default IIS website directly as the result of this website currently being done? I know that there is a scripts folder under the default website at the beginning. What is the conflict? Generally, there are multiple websites on one computer, all of which are virtual directories. I only use this website and direct the default website directory to it to save trouble.
In any case, this problem is solved. If someone is the same as me, go back and change the folder name.