D Murli
Monday, January 4, 2021
Javascript getElementById based on a partial string
document.querySelector('[id$="MySufixIdString"]').id;
The selector means: get an element where the attribute [id] ending with the string "MySufixIdString".
^
matches the start
*
matches any position
$
matches the end
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment