im trying to get the id of an element that will be partially dynamic every time, separated by a colon. here is an example of what i mean:
<input type="text" id="j_id235:keyValue" />
the part after the colon is always the same, i need to somehow search by that only.
i've tried this:
console.log(document.querySelector('[id^=:keyValue]').id)
but am getting this error:
Uncaught SyntaxError: Failed to execute 'querySelector' on 'Document': '[id^=:keyValue]' is not a valid selector.