select 下拉框设置为只读


使用以下方法 传入要设置的下拉对象即可
function SetReadOnly(obj){ 
                    if(obj){
                    obj = obj.parentElement;
                    obj.onmousemove = function(){obj.setCapture()};
                        obj.onfocus = function(){obj.blur();}; 
                        obj.onmouseout = function(){obj.releaseCapture();};
                      
                    } 

你可能感兴趣的:(select)