js设置select只读

由于select没有readOnly属性,设置其只读如下

//支付方式限制修改
         var select = document.all.pay_type1;
         select.onclick= function (){
             var index = this.selectedIndex;
             this.onchange = function(){
                 this.selectedIndex = index;
             };
         };

只是一种伪只读

posted @ 2012-09-24 14:44  吉布鑫  阅读(3396)  评论(0)    收藏  举报