When I tried to execute the following code on the browser console, it was recognized separated by - and the code could not be executed successfully.I'd like to know how to deal with it, but could you tell me how to deal with it?
document.example-form-name.submit()
Use bracket notation.
document ["example-form-name"].submit()
Generally, if the property name is not a valid JavaScript identifier, do this.
© 2024 OneMinuteCode. All rights reserved.