Javascript method to determine whether the id exists: 1. Create an HTML sample file; 2. Add a script tag; 3. Use the "function exist(id){...}" method to determine whether the id exists. .
The operating environment of this article: windows7 system, javascript version 1.8.5, Dell G3 computer.
How does JavaScript determine whether the id exists?
js method to determine whether id exists
The code is as follows:
[Recommended learning:javascript basic tutorial]
The above is the detailed content of How to determine if id exists in javascript. For more information, please follow other related articles on the PHP Chinese website!