想要“hello”变成蓝色怎么破?
<span>hello<\span>
在style里面
span{colour:blue};
其实我是想把document.write("hello");中的"hello"变成蓝色,我试了一下,可以这么整
<p id="p3"><script type="text/javascript"> document.write("hello"); document.getElementById("p3").style.color="blue"; </script></p>
<p id="pcon">Hello !</p>
<script type="text/javascript">
var mychar = document.getElementById("pcon");
mychar.style.color="blue";
</script>