Home >Web Front-end >JS Tutorial >How to get basePath in js file to deal with js path problem_javascript skills
The problem of js path is sometimes difficult to deal with. In jsp, we can use el expression to directly obtain basePath, but el expression cannot be used in a separate js file, and we do not want to write a separate variable in jsp. You can use the following Method: