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

JavaScript 简单树型

<html>
 <head>
  <script type="text/javascript">
   function tree(treethis){
    if (treethis.alt == "+"){
     treethis.alt = "-";
     document.getElementById("bench").style.display="block";
    }else
    {
     treethis.alt = "+";
     document.getElementById("bench").style.display="none"; 
    }
   }
  </script>
 </head>
 <body>
  <a href="javascript:void(0)" style ="text-decoration:none;color:red" onclick="tree(this);" alt="+">aaaa</a>
  <span id="bench" style="display:none;margin-left:19px;">
   <?php
    $tree_bentch = array("aaa","bbb","ccc");
    for ($i=0;$i<count($tree_bentch);$i++){
     echo "<div>";
     echo "<a href=\"http://www.baidu.com\">$tree_bentch[$i]</a>";
     echo "</div>";
    }
   ?>
  </span>
 </body>
</html>


相关文档:

javascript鼠标双击时触发事件大全4

javascript事件列表解说
事件 浏览器支持 解说
一般事件 onclick IE3、N2 鼠标点击时触发此事件
ondblclick IE4、N4 鼠标双击时触发此事件
onmousedown IE4、N4 按下鼠标时触发此事件
onmouseup IE4、N4 鼠标按下后松开鼠标时触发此事件
onmouseover IE3、N2 当鼠标移动到某对象范围的上方时触发此事件
onmou ......

JavaScript静态页面值传递之Cookie

  利用Cookie:Cookie是浏览器存储少量命名数据.它与某个特定的网页或网站关联在一起。
  Cookie用来给浏览器提供内存,以便脚本和服务器程序可以在一个页面中使用另一个页面的输入数据。
  Post.htm
以下是引用片段:
<input type="text" name="txt1">
<input type="button" value="Post">
<s ......

Javascript 开发工具


Build your web applications quickly and easily using the industry leading web application IDE -- Aptana Studio.
Introduction:
Aptana Studio is a complete web development environment that combines powerful authoring tools for HTML, CSS, and JavaScript, along with thousands of additional plugins ......

javascript获取分辨率,网页窗口大小等值

<html>19楼空间,`(uqj3~9?!F
<body>
Ob*p#?L;DL0<scrīpt   LANGUAGE="Javascrīpt">
+t:{z]tbs0var s = "";19楼空间e kA3HoT1H
s += "网页可见区域宽:" + document.body.clientWidth;19楼空间cy2if}:H/SE@
s += "<br>网页可见区域高:"+ document.bo ......

JavaScript 判断checkbox取值问题

要取什么值?
取value:getElementById("STB_433").value;
取状态(是否check):getElementById("STB_433").checked
取ID:getElementById("STB_433").id
...
var checkboxs=document.getElementsByTagName("input");
var i;
for(i=0;i<checkboxs.length;i++)
{
if(checkboxs[i].type=='checkbox')
{ ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号