公告:所有在 
2025 年 4 月 15 日之前注册使用 Earth Engine 的非商业项目都必须
验证是否符合非商业性质的资格条件,才能继续使用 Earth Engine。如果您在 2025 年 9 月 26 日之前未完成验证,您的访问权限可能会被暂停。
  
        
 
       
     
  
  
  
    
  
  
  
    
      ui.Button
    
    
      
    
    
      
      使用集合让一切井井有条
    
    
      
      根据您的偏好保存内容并对其进行分类。
    
  
  
      
    
  
  
  
  
  
    
  
  
    
    
    
  
  
带有文字标签的可点击按钮。
| 用法 | 返回 | 
|---|
| ui.Button(label, onClick, disabled, style, imageUrl) | ui.Button | 
| 参数 | 类型 | 详细信息 | 
|---|
| label | 字符串,可选 | 按钮的标签。默认为空字符串。 | 
| onClick | 函数(可选) | 点击按钮时触发的回调。回调会传递按钮 widget。 | 
| disabled | 布尔值,可选 | 按钮是否已停用。默认值为 false。 | 
| style | 对象,可选 | 一个对象,包含允许的 CSS 样式及其要为此 widget 设置的值。默认为空对象。 | 
| imageUrl | 字符串,可选 | 可选的图片网址。如果提供,按钮将呈现为图片,并且值文本将在鼠标悬停时显示。仅允许使用数据网址和从 gstatic.com 加载的图标。 | 
  
  
  
  
  
 
  
    
    
      
       
    
    
  
  
  如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
  最后更新时间 (UTC):2025-07-26。
  
  
  
    
      [null,null,["最后更新时间 (UTC):2025-07-26。"],[],["The `ui.Button` function creates a clickable button. It accepts optional arguments: `label` (text), `onClick` (callback function on click), `disabled` (boolean to disable), `style` (CSS styling), and `imageUrl` (image for the button). When clicked, the `onClick` callback is triggered, receiving the button widget.  The button can be customized with a text label or an image, and its appearance can be altered via CSS. Only specific URLs are allowed for the image.\n"]]