页面表格的显示和隐藏(2)

页面控制显示和隐藏

 

< script language = " javascript " >
function  show(){
if (table1.style.display == " none " ){
table1.style.display
= " block " ;
div.innerHTML
= " 隐藏 " ;
}
else {
table1.style.display
= " none " ;
div.innerHTML
= " 显示 " ;
}
}
</ script >
< html >
< p >< a href = " javascript:show(); "  id = " div " > 隐藏 </ a ></ p >
< table width = " 100 "  border = " 1 "  cellspacing = " 5 "  cellpadding = " 10 "  id = " table1 "  style = " display: " >
  
< tr >
    
< td > 哈哈 </ td >
  
</ tr >
</ table >
</ html >

代码拷贝出来存为html文件直接有效果,改iframe的显示和隐藏小Kiss了,如果这再不会改,可以回家放羊了 

你可能感兴趣的:(JavaScript,html,iframe,function,table,border)