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

用javascript动态设置css样式的值

 css控制位置:
纯数字
el.style.posLeft = 0;
el.style.posTop = 0;
数字+单位
el.style.left = "0px";
el.style.top = "0px";
css控制元素的样式:
document.getElementById("para").style.fontWeight ="bold";
或(其他也是这样):
document.getElementById("para").className ="strong";


相关文档:

JavaScript调用swf中函数

The ExternalInterface API
        之前我们使用flash调用javascript函数,一般使用这样的方法:
代码:
getURL(“javascript:alert(‘hello zhang-chao.com’);”); //注意字符串 双引号 里面加单引号
但是使用这种方法从flash调用javascript函数仍存在许多困难 ......

CSS中元素的隐藏和显示(visibility, display)

 visibility: hidden, visible
 display: block, inline, none
visibility: 控制页面元素的显示和隐藏,不空值元素的位置特征。
document.getElementById("div").style.visibility = "hidden"; //隐藏元素
document.getElementById("div").style.visibility = "visible"; //显示元素
当元素在页面是隐藏时, ......

javascript新闻列表排序简单封装


可以控制列表按日期以及按字数排序.升或者降序.
代码简单封装,按一定的格式调用即可。
代码写的比较繁琐,很多方法用的很原始...
代码如下:
 
 
 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号