无标题文档
function changeCont()
{
var num=document.getElementById("select");
var optValue=num.value;
//alert(optValue);
var divCont=document.getElementById("div1");
divCont.style.fontSize=(optValue*10)+'px';
if(optValue==1){document.getElementById("div1").style.color='red';}
if(optValue==2){document.getElementById("div1").style.color='blue';}
if(optValue==3){document.getElementById("div1").style.color='green';}
if(optValue==4){document.getElementById("div1").style.color='red';}
if(optValue==5){document.getElementById("div1").style.color='pink';}
}
12345 改变文字大小