<span id=test1>Test text</span>
<button onclick="test1.style.color='red'">Change Color</button>
<button onclick="test1.style.fontSize='30px'">Change Size</button>

解决方案 »

  1.   

    <span id=test1>Test text</span><button onclick="test1.innerHTML='<font color=red>Test text</font>'">Change 
    Color</button><button onclick="test1.innerHTML ='<font color=red size=5>Test text</font>'">Change Color</button>
      

  2.   

    <span id=test1>Test text</span><button onclick="test1.innerHTML='<font color=red><B>Test text</B></font>'">Change 
    Color</button><button onclick="test1.innerHTML ='<img src=111.jpg >'">Change Color</button>
      

  3.   

    变成粗体
    test1.style.fontWeight="bold";改变文本左边的图片
    img1.src = "test.jpg";
      

  4.   

    <span id=test1>Test text</span>
    <button onclick="test1.style.font.bold=true;">bold</button>
    <button onclick="test1.style..background=''">Change image</button>