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

js+css实现翻页

<!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=UTF-8">  
<title>无标题文档</title>  
</head><body>  
  
<div id="frameContent">  
写上你要分页的东西!   
</div>  
<p>  
</p><div id="pages" style="font-size: 12px;"></div>  
<script language="javascript">  
var obj = document.getElementById("frameContent"); //获取内容层   
var pages = document.getElementById("pages"); //获取翻页层   
var pgindex=1;                                 //当前页   
var lastPage = 1 ;                             //最后一页   
var offsetHeight_ys = parseInt(obj.offsetHeight) ;   
window.onload = function() //重写窗体加载的事件   
{   
     //alert("parseInt(obj.scrollHeight)="+parseInt(obj.scrollHeight));   
     //alert("parseInt(obj.offsetHeight)="+parseInt(obj.offsetHeight));   
      var allpages = Math.ceil(parseInt(obj.scrollHeight)/parseInt(obj.offsetHeight));//获取页面数量   
     lastPage = allpages ;   
     pages.innerHTML = "<b>共"+allpages+"页</b>"; //输出页面数量 


相关文档:

CSS笔记之简写

2009-10-20 13:30:21
简写CSS一直被我忘记,没办法就搜了点资料,记录如下:
font
简写:
font:italic small-caps bold 12px/1.5em arial,verdana;
等效于:
font-style:italic;font-variant:small-caps;font-weight:bold;font-size:12px;line-height:1.5em;font-family:arial,verdana;
顺序:font-style | font-var ......

JavaScript CSS Style属性对照表


JavaScript CSS Style属性对照表
文章来源:http://www.phplamp.org/2008/10/jsavscript-js-css-style/
为了达到某种特殊的效果我们需要用Javascript动态的去更改某一个标签的Css属性。比如:鼠标经过一个图片时我们让图片加一个边框,代码可能是这样:
JavaScript代码
<script type="text/javascript"> & ......

js/css语法对照


盒子标签和属性对照
CSS语法(不区分大小写)
JavaScript语法(区分大小写)
border
border
border-bottom
borderBottom
border-bottom-color
borderBottomColor
border-bottom-style
borderBottomStyle
border-bottom-width
borderBottomWidth
border-color
borderColor
border-left
borderLeft
border ......

IE6 下:hover 中bug解决了(纯CSS)

这个bug,主要是一个二级菜单,在ie7中hover时正常显示出来,在ie6下没有效果。在网上找了很多资料,弄了好几天,最终是参照别人的代码,用的纯css经过自己的整理,就把它给弄下来了。希望以后自己多来看看。
如下:
 -------------------
css代码:
.allMenu
{
    width: 8 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号