javascript mousewheelµÄʼþ·ÖÅÉ
ÕâÊÇÒ»¸öºÜÌØÊâµÄʼþ£¬w3cĬÈÏÊdzÐÈÏΪ¡°mousewheel¡±£¬µ«ÎÒÔÚËüÉÏÃæÕÒµ½µÄ×ÊÁϱȽÏÉÙ£¬Ö»·¢ÏÖÒ»¸ö¡£ºÅ³Æ×î±ê×¼µÄFF£¬ÓÃÒ»¸ö˽ÓÐʵÏÖDOMMouseScroll¡£×Ü֮ʵÏֺܻìÂÒ¡£ÎÒÃÇÏÈ¿´¸÷ä¯ÀÀÆ÷¶ÔËüµÄÖ§³Ö³Ì¶È°É¡£
IEfirefoxsafarichromeopera
window¶ÔÏófalsetruetruetruetrue
Îĵµ¶ÔÏótruetruetruetruetrue
ÔªËؽڵãtruetruetruetruetrue
ÏÈ¿´FFµÄʼþ·ÖÅÉ
window.addEventListener("DOMMouseScroll",function(event){
alert(event.type)
alert(event.clientY)
},false);
var event = document.createEvent("MouseEvent");
//ΪÁËÖ¤Ã÷·ÖÅɳɹ¦£¬ÌØÒ⽫ÆäclientYÉèΪ90
event.initMouseEvent("DOMMouseScroll",true, null, window,0,0,0,0,90,false,false,false,false,0,null);
window.dispatchEvent(event)
<!doctype html>
<html lang="zh-ch">
<head>
<meta charset="utf-8" />
<meta content="IE=8" http-equiv="X-UA-Compatible"/>
<title>mousewheelµÄʼþ·ÖÅÉ by ˾ͽÕýÃÀ</title>
<script type="text/javascript">
window.onload = function(){
window.addEventListener("DOMMouseScroll",function(event){
alert(event.type)
alert(event.clientY)
},false);
var event = document.createEvent("MouseEvent");
//ΪÁËÖ¤Ã÷·ÖÅɳɹ¦£¬ÌØÒ⽫ÆäclientYÉèΪ90
event.initMouseEvent("DOMMouseScroll",true, null, window,0,0,0,0,90,false,false,false,false,0,null);
window.dispatchEvent(event)
}
</script>
<style title="text/css">
</style>
</head>
<body>
</body>
</html>
ÔËÐдúÂë
ÎÒÃÇ¿ÉÒÔ¿´µ½ËäÈ»ÆäËû±ê×¼ä¯ÀÀÆ÷Ò²Ö§³ÖÕâ¸öÃûΪDOMMouseScrollµÄʼþ·¢ÅÉ£¬µ«µ±ÎÒÃÇÊÖ¶¯¹ö¶¯Êó±ê»¬ÂÖʱ£¬Ò²Ö»ÓÐFFÓз¢Ó¦£¬µ¯³öÁ½¸öalert¡£
¶ÔÓÚÆäËû±ê×¼ä¯ÀÀÆ÷£¬ÎÒÃÇÓÃmousewheel
Ïà¹ØÎĵµ£º
javascript ¿ØÖÆ htmlÔªËØ ÏÔʾ/Òþ²Ø
1¡£±àдjsº¯Êý
<script type="text/javascript">
function display(y){$(y).style.display=($(y).style.display=="none")?"":"none";}
function $(s){return document.getElementById(s);}
</script>
2. ÒªÏÔÊ ......
============˼·============
1¡¢Ê×ÏÈÏëµ½£¬ÔÚչʾÐÎÏóµÄdivÖУ¬Ò»¶¨Òª½«¿ã×Ó¡¢Ò·þ¡¢Í··¢ºÍÍ·ÊεÄͼƬ·Ö±ð·ÅÔÚ²»Í¬µÄ²ã£¨Õâ¿ÉÒÔÓÃz-index±ê¼Ç£©¡£ÒòΪͷÊÎÒª¸Çסͷ·¢£¬Í··¢Òª¸ÇÔÚÒ·þÉÏ£¬Ò·þµÄÏÂÑØÒ²Òª¸Çס¿ãÍ·¡£
2¡¢¸÷ÖÖÒÂÎïÈçºÎÔÚdivÖж¨Î»£¿¿ÉÒÔÔÚÖÆ×÷ͼƬʱ¾Í¶¨ºÃλÖã¬Í¼Æ¬³ß´çÓëdivÏàͬ£¬¸ÃÓж«Î÷µÄµØ·½·ÅÉ϶«Î÷ ......
ShowModalDialogº¯ÊýµÄ¹¦ÄÜ£º
´ò¿ªÒ»¸ö×Ó´°¿Ú£¬²¢ÇÒ¿ÉÓ븸´°¿ÚÏ໥´«µÝÊý¾Ý£¬ËüÓëwindow.openµÄ×î´óÇø±ð¾ÍÔÚÓÚÓÉShowModalDialog´ò¿ª×Ó´°¿Úºó£¬¸¸´°¿Ú½«²»ÄÜ
²Ù×÷¡£
ʹÓ÷½·¨£º
vReturnValue = window.showModalDialog(sURL [,
vArguments] [, sFeatures])
²ÎÊý˵Ã÷£º
sURL
±ØÑ¡²ÎÊý£¬ÀàÐÍ£º×Ö·û´ ......
JavascriptµÄEvent¶ÔÏóÓÃÀ´ÃèÊöJavascriptµÄʼþ£¬ËüÖ÷Òª×÷ÓÃÓÚIE4ºÍNN4ÒÔºóµÄ¸÷¸öä¯ÀÀÆ÷°æ±¾ÖС£
Event´ú±íʼþ״̬£¬Èçʼþ·¢ÉúµÄÔªËØ£¬¼üÅÌ״̬£¬Êó±êλÖúÍÊó±ê°´Å¥×´Ì¬¡£Ò»µ©Ê¼þ·¢Éú,±ã»áÉú³ÉEvent¶ÔÏó£¬Èçµ¥»÷Ò»¸ö°´Å¥£¬ä¯ÀÀÆ÷µÄÄÚ´æÖоͲúÉúÏàÓ¦µÄ event¶ÔÏó¡£
IE¶ÔʼþµÄÒýÓÃ
ÔÚIE4ÒÔÉÏ°æ±¾ÖУ¬event¶ÔÏó×÷Î ......
ÔÚJavaScriptÖÐ×Ö·û´®×éºÏÏà¼Ó£¬´ó¼ÒÒ»°ãÖ±½ÓÓÃ+Æ´½ÓÆðÀ´.ÀýÈç:
for(i=0; i<len; i++){
if(zdname != ""){
zdname += "#" + trNode.children.item(i).getAttribute("busPath");
}else{
zdname = trNode.children.item(i).getAttribute("busPath");
  ......