qq_龙_18
2015-12-15 20:52
我输入这个代码为何不行呢?在html里面也写了<p id="p1">jsjsjs</p>
document.write("hello");
document.getElementById("p1").style.color="blue";
<!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>JavaScript入门篇
741593 学习 · 9869 问题
相似问题