<div class="col-num-two" data-bind="CurrentJob.addr">I need this text</div>
The data is AJAX'd in and I need to change the text inside. I'm just using a 1 second timeout, but how do I select that div since there is no 'id' ?
After the timeout fires use code like this:
var currentJobAddr = document.querySelector ("div[data-bind='CurrentJob.addr']");
if (currentJobAddr)
currentJobAddr = currentJobAddr.textContent;
else
alert ('Current job addr not found.')
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.