輸出問題求解?
我輸入這個代碼為何不行呢?在html里面也寫了<p id="p1">jsjsjs</p>
document.write("hello");
document.getElementById("p1").style.color="blue";
我輸入這個代碼為何不行呢?在html里面也寫了<p id="p1">jsjsjs</p>
document.write("hello");
document.getElementById("p1").style.color="blue";
2015-12-15
舉報
2015-12-15
<!DOCTYPE?HTML> <html> <head> ????<meta?http-equiv="Content-Type"?content="text/html;?charset=utf-8"?/> ????<title>test</title> </head> <body> <p?id="p1">jsjsjs</p> <script?type="text/javascript"> ????document.write("hello"); ????document.getElementById("p1").style.color="blue"; </script> </body> </html>