下拉框模拟只读
/**
* 为下拉框模拟只读效果
*/
function setSelectReadOnly(obj){
??? if(!document.getElementById){
??????? return false;
??? }
??? var span='<span onmousemove="this.setCapture();" onmouseout="this.releaseCapture();"></span>';
??? var oSpan=document.createElement(span);
??? if(!oSpan){
??????? return false;
??? }
??? if(!obj){
??????? return false;
??? }
??? obj.style.color="#666666";?
??? obj.replaceNode(oSpan);
??? oSpan.appendChild(obj);
??? obj.onfocus=function(){
??????? this.blur()?
??? };
}
?