用法
代码:
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <title>JS学习</title> <script src="../Scripts/MyJS.js"> </script> </head> <body> <p id="pid" style="color:hotpink">Hello</p> <script> document.write(document.getElementById("pid").innerHTML); //document.getElementById("pid").innerHTML= "测试"; </script> </body> </html>
End
来源:https://www.cnblogs.com/LeeSki/p/12273476.html