You can try using setAttribute
on the fetched element.(您可以尝试在提取的元素上使用setAttribute
。)
For example - In your case, it would be like(例如-就您而言,这就像)
const pdfDrive = document.getElementById('pdfDrive')
pdfDrive.setAttribute('src', finalURL)
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…