Ext.form.field.Dispaly只读文本字段

1、Ext.form.field.Dispaly主要配置

配置项类型说明
htmlEncode Boolean 对展示内容是否进行HTML编码,默认为false

2、Ext.form.field.Dispaly示例

代码:

<!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.Display示例</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.QuickTips.init();
            Ext.create("Ext.form.Panel", {
                title: "Ext.form.field.Display示例",
                width: 200,
                frame: true,
                renderTo: Ext.getBody(),
                bodyPadding: 5,
                items: [{
                    fieldLabel:"展示字段",
                    xtype:"displayfield",
                    value:"<b>ExtJS 4.0.7",
                    labelWidth:70,
                    labelSeparator:""
                }]
            });
        });
    </script>
</head>
<body>
</body>
</html>

效果图:

posted @ 2012-04-22 21:17  libingql  阅读(2544)  评论(0编辑  收藏  举报