ฉันต้องต่อไปนี้ที่ถูกซ่อน <p>
ธาตุในร่างป้ายกำกับของของฉันยังแฟ้ม HTML(สำหรับของฉัน chrome ส่วนขยาย).
<p hidden id="button">
<a id="dashboard-btn" href="www.google.com" target="_blank" rel="noopener noreferrer">
www.google.com
</a>
</p>
ฉันอยากจะ unhide นี้โดยใช้ จาวาสคริปต์. ของฉันแบบสุ่มพยายามที่ล้มเหลวในการ unhide มัน:
document.getElementById("button").style.visibility = 'visible';
[แก้ไข] นี้(ยัง)ทำงาน:
document.getElementById("button").style.display = "block";
document.getElementById("button").style.display = "block";