<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>document.getElementById</title> </head> <body> <p id="con">JavaScript</p> <script type="text/javascript"> var mychar = document.getElementById("con"); console.log(mychar); alert(mychar) ; document.write("结果:" + mychar); </script> </body> </html>
慕莱坞245
百利甜
yanhzyayaya
相关分类