易截截图软件、单文件、免安装、纯绿色、仅160KB

javascript 控制 DIV等html元素的显示和隐藏

1
、编写
js
函数
<script
type="text/javascript">
    function display(id){
        var
traget=document.getElementById(id);
        
if(traget.style.display=="none"){
                
traget.style.display="";
         }else{
                
traget.style.display="none";
       }
   
}
</script>
2.、
要显示
/
隐藏的
html
元素加上
id
属性
<table>
     <tr id="menu"
>   
        <td>
控制这个
tr
的显示
/
隐藏
</td>
    </tr>
</table>
3
、添加按钮,链接等触发
js
函数
<input type="button"
onclick="display(
'menu'
)"
  
value="
显示
/
隐藏
"/>
<a href="#"  
onclick="display(
'menu'
)"
  
>
显示
/
隐藏
</a>
javascript
显示隐藏层
<div id=""
style="display:none;">
广告
</div>
<input type="botton"
onclick="
函数
">
<script
language=javascript>
function
函数
{
if(thisdiv.style.display=='none'){
thisdiv.style.display=""
}
else
thisdiv.style.display="none"
}
</script>
你先给
div
取个
ID=“AA”thisdiv=AA
javascript
隐藏
/
显示表单对象

<SCRIPT
language=javascript>
function expandIt(el) {
      whichEl
=document.getElementById(el)
      if (whichEl.style.display ==    'none')
{
 &nbs


相关文档:

Struts的html:checkBox标签超郁闷的问题

 被Struts的html:checkBox标签使用的小问题郁闷了两天,今天终于找到了解决的办法。如果大家也遇到同样的问题,可以参考。
1)需求:
      当通过菜单进入页面时,页面中的checkbox处于被选中状态,页面提交后forward回本页,对应的checkbox保持提交时的状态,也就是说:如果提交时check ......

107个常用Javascript语句

1.         document.write( " "); 输出语句
2.JS中的注释为//
3.传统的HTML文档顺序是:document- >html- >(head,body)
4.一个浏览器窗口中的DOM顺序是:window- >(navigator,screen,history,location,document)
5.得到表单中元素的名称和值:document.getElementB ......

javascript弹出一个指定大小的窗口


Java代码
<script language="JavaScript">   
function js_show(per_id)   
{   
   window.open('/weihu/person/viewResume.jsp?perID='+per_id, 'resume', 'resizable=yes,menuBar=0,toolBar=0,scrollbars=yes,width=800,height=600,left ......

javascript基础

每一项都是js中的小技巧,但十分的实用!
1.document.write(""); 输出语句
2.JS中的注释为//
3.传统的HTML文档顺序是:document->html->(head,body)
4.一个浏览器窗口中的DOM顺序是:window->(navigator,screen,history,location,document)
5.得到表单中元素的名称和值:document.getElementById("表单中元素的 ......

JavaScript xmlTree

<!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>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title> JavaScript: xm ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号