div做的选择图片的弹出框

做这个的要点是弹出框div的属性.style.position要设置为absolute,.style.zIndex要设置成很大的数,比如1000,10000,因为要在最顶层麻,获取鼠标位置的函数有

window.event.clientX,window.event.clientY(相对客户区的偏移量),window.event.offsetX,window.event.offsetY(相对触发对象的偏移量) window.event.screenX,window.event.screenY(相对于屏幕的偏移量).event还有很多属性:.altKey,.button(0 没按键 1 按左键 2 按右键 3 按左右键 4 按中间键 5 按左键和中间键 6 按右键和中间键 7 按所有的键 ),.cancelBubble(是否取消路由到上层事件),.keyCode 等等

头像文件名用ajax获取.

 

popup.js


 

posted @ 2009-11-03 06:44  淡然  阅读(1386)  评论(0)    收藏  举报