<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JS代码的位置</title>
<script type="text/javascript">
document.write("I love")
</script>
</head>
<body>
<script type="text/javascript">
document.write("rose")
</script>
</body>
</html>
--------怎么改变显示结果中I love和rose的字体颜色
document.write('<p style="color:red">i love</p>');
<p>一个块级元素,所以自动换行了,加单引号是因为"color:red"是双引号,所以要用单引号