You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
the Dom did not work for me because the select element was not defined.
const quantity = document.querySelector(.product-quantity-container-${productId} select);
we have add the select element at the end so that the querrySelector knows the full path to the exact element we are trying to grab the value from.
Activity
kenshih1989 commentedon Apr 16, 2025
Hi @Reddysaicharan ,
To get the value of the Select tag, we can use
document.querySelector("select").value;Following is the example that I tried out:
The screenshot below show the result:
