1、Ext.form.Label主要配置

配置项 类型 说明
forId String 与标签字段进行关联的目标组件的inputId
html String 显示在标签字段innerHTML的HTML片段,如果同时指定了text配置则html优先
text String 显示在标签中的文本

2、Ext.form.Label示例

代码:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Ext.form.field.Label示例</title>
    <link href="ext-4.0.7-gpl/resources/css/ext-all.css" rel="stylesheet" type="text/css" />
    <script src="ext-4.0.7-gpl/bootstrap.js" type="text/javascript"></script>
    <script type="text/javascript">
        Ext.onReady(function () {
            Ext.create("Ext.form.Panel", {
                title: "Ext.form.field.Label示例",
                width: 200,
                frame: true,
                renderTo: Ext.getBody(),
                bodyPadding: 5,
                items: [{
                    xtype: "label",
                    forId: "UserName",
                    text: "用户名"
                }, {
                    name: "UserName",
                    xtype: "textfield",
                    inputId: "UserName",
                    hideLabel: true
                }]
            });
        });
    </script>
</head>
<body>
</body>
</html>

效果图:

Ext.form.Label标签字段

相关文章:

  • 2022-12-23
  • 2021-06-29
  • 2021-12-16
  • 2021-07-17
  • 2022-01-04
  • 2022-12-23
  • 2021-12-20
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-11-02
  • 2021-11-01
  • 2022-12-23
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
相关资源
相似解决方案