執行 ❯
建立您
自己的
網站
×
更改方向
儲存程式碼
更改主題,深色/淺色
前往Spaces
<!DOCTYPE html> <html> <body> <p id="myP" style="display:none;">This is a p element.</p> <button type="button" onclick="myFunction()">Return the display type of p</button> <script> function myFunction() { alert(document.getElementById("myP").style.display); } </script> </body> </html>