下拉头像菜单
<!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" lang="zh-CN">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta http-equiv="Content-Language" content="zh-CN" />
<meta content="all" name="robots" />
</head>
<body>
<script language="JavaScript">
<!--
window.shq={};
shq.$=function(o){return typeof(o)=="string"?document.getElementById(o):o}
function getxy(obj)
{
var abs={x:0,y:0}
while(obj!=document.body){
abs.x+=obj.offsetLeft;
abs.y+=obj.offsetTop;
obj=obj.offsetParent;
}
abs.x=window.screenLeft+document.body.clientLeft+abs.x-document.body.scrollLeft;
abs.y=window.screenTop+document.body.clientTop+abs.y-document.body.scrollTop;
return abs;
}
//-->
</script>
头像:<span style="display:absolute;">
<input name="Bheadpic" id="Bheadpic" value="1" style="width:37px; height:12px; font-size:10px; "/><input type='button' value='6' style='font:12px/1 Webdings; height:16px; width:16px; border-color:black; text-align:center; border-top-color:white;border-left-color:white;border-width:1px;' onclick="shq.$('divpic').onclick=function(event){var e=event?event.target:window.event.srcElement;if(/gif/i.test(e.getAttribute('src')))shq.$('Bheadpic').value=e.getAttribute('src').replace(/.*?(\d+\.gif)/,'$1');this.style.display='none';}
shq.$('divpic').style.left=getxy(this).x-34;
shq.$('divpic').style.display=shq.$('divpic').style.display==''?'none':'';">
<div id="divpic" style="position:Absolute; display:none; width:60px; height:120px; padding-top:20px; overflow-y:scroll;clip:rect(21px auto auto auto);">
<img src="headpic/1.gif">
<img src="headpic/2.gif">
<img src="headpic/3.gif">
<img src="headpic/4.gif">
<img src="headpic/5.gif">
<img src="headpic/6.gif">
<img src="headpic/7.gif">
<img src="headpic/8.gif">
<img src="headpic/9.gif">
<img src="headpic/10.gif">
<img src="headpic/11.gif">
<img src="headpic/12.gif">
</div>
</span>
</body>
</html>


window.shq
浙公网安备 33010602011771号