散分,发个个ASP+AJAX的小例子。。。
测试地址。。
http://www.zhb.org.cn/wc/search/search.htm
源码下载。。
http://www.zhb.org.cn/wc/search/code.rar
顺便在贴几个JS小特效。。。
忘各位老师指点。。
一:滚动(marquee)。。
<html>
<head>
<script type= "text/javascript ">
function $(id) {
return document.getElementById(id);
}
function marquee(time, oa, ol, or) {
/*
marquee 实现类(修改某某的思路,不知道是谁想的,反正不是我^o^)
time 值越大速度越慢;
oa最外层div
ol左边的td
or右边的td
*/
var timer, width = ol.offsetWidth;
function move() {
//当滚动条移动到最后时,把它移回开头即0
if (oa.scrollLeft > = width)
oa.scrollLeft = 0;
else
oa.scrollLeft ++;
}
or.innerHTML = ol.innerHTML;
oa.style.overflow = "hidden ";
or.style.width = ol.offsetWidth;
oa.onmouseover = function () {
window.clearInterval(timer);
};
oa.onmouseout = function () {
timer = window.setInterval(move, time);
};
timer = window.setInterval(move, time);
};
window.onload = function () {
new marquee(25, $( "demo "), $( "demo1 "), $( "demo2 "));
}
</script>
</head>
<body>
<div id= "demo " style= "border:#CCCCCC 1px dashed; width:300px; "> <!--设置显示的宽度-->
<table cellspacing= "0 " cellpadding= "0 ">
<tbody>
<tr>
<td id= "demo1 ">
<table width= "342 " cellpadding= "0 " cellspacing= "0 "> <!--注意这里的宽度必须设置,并且要设置为具体值-->
<tr align= "center ">
<td> Left </td>
<td> Right </td>
</tr>
</table>
</td>
<td id= "demo2 "> </td>
</tr>
</tbody>
</table>
</div>
</body>
</html>
二:浮动广告。。
<html>
<head>
<style type= "text/css ">
body {
height:100%;
}
#window, #window1 {
z-index:99;
position:absolute;
height:100px;
width:100px;
background-color:#CCCCCC;
}
#window1 {
z-index:100;
background-color:#00FF00;
}
#show {
height:2000px;
width:1px;
}
</style>
<script type= "text/javascript ">
function scrollGS() {
function move(o) {
if (document.getElementById(o.id)) {
o.style.left = o.offsetLeft + document.body.scrollLeft - o.oscrollLeft
+ document.body.clientWidth - o.oclientWidth + "px ";
o.style.top = o.offsetTop + document.body.scrollTop - o.oscrollTop
+ document.body.clientHeight - o.oclientHeight + "px ";
o.oscrollLeft = document.body.scrollLeft;
o.oscrollTop = document.body.scrollTop;
o.oclientWidth = document.body.clientWidth;
o.oclientHeight = document.body.clientHeight;
window.status = o.style.top;
window.setTimeout(move, 50, o);
}
}
function closemove(o) {
if (o.offsetTop - o.oscrollTop - document.body.clientHeight < 0) {
o.style.top = o.offsetTop + 1 + "px ";
window.setTimeout(closemove, 10, o);
} else {
window.status = "已经移除.. "
document.body.removeChild(o);
}
}
this.add = function (w) {
w.oscrollLeft = document.body.scrollLeft;
w.oscrollTop = document.body.scrollTop;
w.oclientWidth = document.body.clientWidth;
w.oclientHeight = document.body.clientHeight;
w.style.left = w.oscrollLeft + document.body.clientWidth - w.offsetWidth;
w.style.top = w.oscrollTop + document.body.clientHeight - w.offsetHeight;
w.onmousedown = function () {
closemove(w);
};
move(w);
}
}
window.onload = function () {
var interval = window.setTimeout;
window.setTimeout = function (a, b) {
if ( "function " == typeof a) {
var arg = Array.prototype.slice.call(arguments, 2);
var fun = function () {
a.apply(null, arg);
}
interval(fun, b);
} else {
interval(a, b);
}
}
var sc = new scrollGS();
sc.add(document.getElementById( "window "));
sc.add(document.getElementById( "window1 "));
sc = null;
}
</script>
</head>
<body>
<div id= "window "> </div>
<div id= "window1 "> </div>
<div id= "show "> </div>
</body>
</html>
[解决办法]
JF
[解决办法]
友情UP
[解决办法]
感谢楼主分享
[解决办法]
几天不见,原来在研究这个,呵呵!!
[解决办法]
学习........
[解决办法]
收藏
[解决办法]
不错
[解决办法]
收藏
[解决办法]
接分
[解决办法]
测试一下。。。。难道是触发器的问题??。。。。我晕啊
[解决办法]
接分
[解决办法]
呵呵~~不错~~
目前默认查找总页数是15页。。。如果超出按没找到处理。。。
这个有点不理想。。。
[解决办法]
顶
[解决办法]
不错
[解决办法]
不错,收藏
[解决办法]
啥也不说了 支持~
[解决办法]
不错,收藏
[解决办法]
积跬步,以致千里!善
[解决办法]
收藏
[解决办法]
学习了。。。
[解决办法]
樓主好人.
[解决办法]
感谢LZ
[解决办法]
不错,收藏
[解决办法]
支持! ^_^
[解决办法]
顶
[解决办法]
好
[解决办法]
呵呵,感谢分享,偶最喜欢小代码了。。。。
[解决办法]
历害哦,不过看到一个小错误^_^
地址就是,就是你要查看的网纸.
网纸?
[解决办法]
帮顶~~
[解决办法]
不错,不错.
收藏啦.
[解决办法]
UP
[解决办法]
UP
页码作为表单项开放设置...
[解决办法]
顶了,收藏
[解决办法]
不错。!!
[解决办法]
收藏,顶了
[解决办法]
接分
[解决办法]
呵呵。
多谢楼主
学习并收藏。
[解决办法]
收藏了
[解决办法]
收藏了。顶!!!
[解决办法]
jf