---
title: "ExtJs处理点选按钮事件"
author: "Tom_Tomcat"
date: "2014-03-04T18:29:56Z"
tags: []
categories: ["Web前端"]
slug: "extjs"
draft: false
lastmod: "2014-03-04T18:30:50Z"
id: 2025565
url: "https://tom-tomcat.iteye.com/blog/2025565"
---

![](http://dl2.iteye.com/upload/attachment/0094/4763/922e32b1-fc49-337e-8181-4f4513ff9abf.png)

![](http://dl2.iteye.com/upload/attachment/0094/4765/20de2f82-3876-3dc4-8312-23b8292cf1f3.png)  
  

items:\[ ] 里添加的内容：

 

{  
         xtype:'radiogroup',  
         name:'lwzzInfoVO.type',  
         fieldLabel:'类别',  
         id:'type',  
         items:[{  
             boxLabel:'论文',  
          inputValue:'01',  
          name:'type',  
          checked:true  
             },{  
          boxLabel:'著作',  
          inputValue:'02',  
          name:'type'  
                }],  
                listeners: {"change": function() {   
            if (Ext.getCmp("type").getValue().type == "01"){  
                              //alert("论文，没有出版社");  
                                 Ext.getCmp("kwmc").setVisible(true);  
                                 Ext.getCmp("cbs").setVisible(false);  
                             } else {  
                              //alert("著作，没有发表刊物");  
                                 Ext.getCmp("cbs").setVisible(true);   
                                 Ext.getCmp("kwmc").setVisible(false);  
                                  }   
                                }   
                          }  
        }