本帖最后由 jojqian 于 2009-8-2 17:56 编辑
http://bbs.onlylady.com/forum-64-1.html
还是这个功能强大一些!
var MouseX, MouseY
$jquery(document).ready(function(){
$jquery("#list .td1 a").bind("mousemove", function(event) {
MouseX = event.pageX;
MouseY = event.pageY
});
});
function ShowLayerAlbum(ImgSrc, link){
if(MouseX && MouseY){
document.getElementById('LayerAlbum').style.left=MouseX+"px";
document.getElementById('LayerAlbum').style.top=MouseY+"px";
showHideLayers('LayerAlbum','show');
swapImage('AlbumImage',ImgSrc);
swapLink('AlbumLink',link);
}
}
function HideLayerAlbum(){
showHideLayers('LayerAlbum','hide');
}
function showHideLayers(id, v) {
document.getElementById(id).style.visibility=(v=='show')?'visible'v=='hide')?'hidden':v;
}
function swapImage(id, ImgSrc) {
document.getElementById(id).src = ImgSrc;
}
function swapLink(id, link){
document.getElementById(id).href = link;
}
function checkall(form, prefix, checkall) {
var checkall = checkall ? checkall : 'chkall';
for(var i = 0; i < form.elements.length; i++) {
var e = form.elements;
if(e.name != checkall && (!prefix || (prefix && e.name.match(prefix)))) {
e.checked = form.elements(checkall).checked;;
}
}
}
这是他的JS |