$(‘input[type=text]’)
How do I convert this to plain javascript
I’ve been trying to figure this out but no luck
2
const el = document.querySelector("input[type='text']");
You can try this,
[...document.getElementsByTagName("input")].filter(d => d.type === 'text')
Click here to cancel reply.
2
Answers
You can try this,