ExtJs之Ext.isEmpty

时间:2021-09-22 12:48:25
<!DOCTYPE html>
<html>
<head>
    <title>ExtJs</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="ExtJs/packages/ext-theme-crisp/build/resources/ext-theme-crisp-all.css">
		<script type="text/javascript" src="ExtJs/ext-all.js"></script>
		<script type="text/javascript" src="ExtJs/bootstrap.js"></script>
		<script type="text/javascript" src="ExtJs/packages/ext-theme-crisp/build/ext-theme-crisp.js"></script>

    <script type="text/javascript">
			Ext.onReady(function(){
        var panel = new Ext.Panel({
          title: 'SAMPLE',
          renderTo: 'sub1',
          id: 'panel1',
          width: '300px',
          html: "<div id='div1' property1='pro1' style='height:200px;padding:5px;font-size:11pt;font-family:Arial'>" +
            "</div>"
        });
      var comp = Ext.getDom('panel1');
      Ext.Msg.alert("notice","我们已经实例化的Panel是否为空?"+Ext.isEmpty(panel) +
        "<br>Ext.isEmpty(' ', true)的值:" +
        Ext.isEmpty("", true) +
        "<br>Ext.isEmpty(' ', false)的值是" + Ext.isEmpty("", false));
      });
    </script>
</head>
<body>
<div id=sub1></div>
</body>
</html>

  ExtJs之Ext.isEmpty