我是初学javascript,在看下面代码的时候遇到了一个问题!愿请大家帮助一下!帮我解释一下红色部分的代码!特别是那
个javascript中的那个with关键字!
----------------------------------------------------------------------------------------------------------------------------------
#idDIV{width:100%;height:80px;background-color:#FFD700;padding:4px;font : normal normal normal medium normal "Times New Roman" ;}
#idCodeDiv{width:100%;padding:4px;font-family:verdana,tahoma;margin:12px 0px 0px 0px;background-color:#EEEEEE;font-weight:bold;}
</style>
<script>
function rdl_change(e){
var oCodeDiv=document.all("idCodeDiv");
var oDiv=document.all("idDiv");
with (document.all("idSel")) var sValue=options[selectedIndex].value;
oDiv.style.font=sValue;
oCodeDiv.innerText="font : "+sValue+";";
}
</script><div id=idDIV>Every man dies , Not every man really lives .<br>请记住上面这句话。</div>
<br>
<select id="idSel" οnchange="rdl_change();">
<option value="normal normal normal medium normal 'Times New Roman'">---font---
<option value="italic small-caps 600 12pts/18pts 宋体">italic small-caps 600 12pts/18pts 宋体
<option value="caption">caption
<option value="icon">icon
<option value="menu">menu
<option value="message-box">message-box
<option value="small-caption">small-caption
<option value="status-bar">status-bar
</select>
<br>
<div id=idCodeDiv>font : normal normal normal medium normal "Times New Roman" ;</div>