HTML
HEAD
SCRIPT LANGUAGE="JavaScript"
!--
var show_Interval = null;
var hide_Interval = null;
var long_Interval = null;
var short_Interval = null;
function $(id){
return document.getElementById(id);
}
function showDiv(id){
clearInterval(hide_Interval)
show_Interval=setInterval("showDivSlow(\""+id+"\")", 100);
function showDivSlow(id){
var opacity=$(id).filters.alpha.opacity;
if(opacity==100){
clearInterval(show_Interval)
}else{
function longDiv(id){
clearInterval(short_Interval)
long_Interval=setInterval("longDivSlow(\""+id+"\")", 100);
function longDivSlow(id){
var height=$(id).style.height;
clearInterval(long_Interval)
function shortDiv(id){
short_Interval=setInterval("shortDivSlow(\""+id+"\")", 100);
function shortDivSlow(id){
if(height==0){
function hideDiv(id){
hide_Interval=setInterval("hideDivSlow(\""+id+"\")", 100);
function hideDivSlow(id){
if(opacity==0){
//--
/SCRIPT
/HEAD
BODY
button onclick="showDiv(1)"showDiv/button
button onclick="hideDiv(1)"hideDiv/button
button onclick="longDiv(1)"longDiv/button
button onclick="shortDiv(1)"shortDiv/button
/BODY
/HTML
有两种方式:第一段:做界面的时候就把这两个控件都放上去,并默认显示一个,把另一个的visible属性设置为FALSE,在Button的相关事件的响应代码中把Button的visible设为FALSE,把文本框的设为TRUE第二段:只是在初始做界面的时候只是放一个Button,在Button的相关事件(选择事件,鼠标的单击事件等)中添加代码,实例化一个文本框,然后将Button的bound赋给文本框,然后将Button的visible设为FALSE,或者干脆将他dispose了
我这写的不错啊,怎么审核部通过唻?奇怪
eclipse显示被隐藏的文件或文件夹?
这是ide的功能,你想知道ide是怎么做的?而且这个隐藏要有具体情况的吧,比如说方法体和import的逻辑明显就不一样.做法的法,word的文字处理功能比这个都要负责多了,
以上就是土嘎嘎小编为大家整理的java隐藏显示功能代码相关主题介绍,如果您觉得小编更新的文章只要能对粉丝们有用,就是我们最大的鼓励和动力,不要忘记讲本站分享给您身边的朋友哦!!