---
title: "EXTJS局部隐藏问题"
author: "snash"
date: "2009-09-27T18:26:19Z"
tags: []
slug: "extjs"
draft: false
lastmod: "2009-09-27T18:26:19Z"
id: 478819
url: "https://snash.iteye.com/blog/478819"
---

在开发的时候,难免会碰到一些需要在页面隐藏的信息

如果在一般的JSP开发中,如果前面有定义<form id ='fm'></form>
如果在fm中定义了一些div,,则在JS层可以直接这样把这个DIV(id='test')隐藏

fm.test.style.display='none';//隐藏
fm.test.style.display='';//显示

在EXTJS开发中,由于在HTML界面一般都是很干净的,页面元素都定义在JS层,因此在隐藏的定义会稍微麻烦点了..
具体如下,,
html页面:
  <div id = "test"></div>
JS层:
     Ext.getDom(test).style.display = 'none';
      Ext.getDom(test).style.display = ;