KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I want to have a line of code similar to below: var name = $('#input-name').attr("value"); However, the id 'input-name' is not guaranteed to exist. How do I check for its existence so that the assignment does not throw an error?
Tags (comma-separated)
Save Edits
Cancel