html 一些基本方法
1. 超链接的图片去掉边框的方法:
在 语句里加上 border=0
如:<img border=0
src="sadf.jpg">
2.鼠标放上去图片变色的方法:
用到了标签的事件功能,调用方法是 function="this.src='asdf.jpg'"
如:<img border=0 src="a.jpg" onmousemove="this.src='a_on.jpg'"
onmouseout="this.src='a.jpg'"
/>
相关文档:
在Web应用程序特别是Web2.0程序开发中,经常要获取页面中某个元素,然后更新该元素的样式、内容等。如何获取要更新的元素,是首先要解决的问题。令人欣慰的是,使用JavaScript获取节点的方法有很多种,这里简单做一下总结(以下方法在IE7和Firefox2.0.0.11测试通过):
1. 通过顶层document节点获取:
&nbs ......
<html>
<frameset rows="50%,50%">
<frame src="/example/html/frame_a.html">
<frameset cols="25%,75%">
<frame src="/example/html/frame_b.html">
<frame src="/example/html/frame_c.html">
</frameset>
</frameset>
</html> ......
比如说现在有两个毫无关系的html页面:a.html;b.html
从a.html跳到b.html时如何在b.html页面中获得a.html传过来的数据呢?
代码如下:
在a.html中有一个连接指向b.html,<a href="b.html?name='wangzheguilai'">转到b</a>
在b.html中就可以通过js这样获得name的值<script>var name=window.location.se ......
基本步骤
1,把需要排序的行放到tbody中(程序会直接取tbody的rows);
2,把排序行放到一个数组中;
this.Rows = Map(this.tBody.rows, function(o){ return o; });
3,按需求对数组进行排序(用数组的sort方法);
this.Rows.sort(Bind(this, this.Compare, orders, 0));
4, ......