dwz Esc关闭dialog 窗口

document.onkeydown = function(e){
	 	// alert(1)
	 	var keycode = "";
	 	 if(navigator.appName == "Microsoft Internet Explorer")
       {
           keycode = event.keyCode;
           // var realkey = String.fromCharCode(event.keyCode);
       }else{
           keycode = e.which;
           // var realkey = String.fromCharCode(e.which);
       }

       if(keycode == "27"){
       		// alert(27)
       		$.pdialog.closeCurrent()
       }
       // alert("按键码: " + keycode + "字符: " + realkey);
	 }

 

posted @ 2018-04-25 18:34  锐洋智能  阅读(285)  评论(0编辑  收藏  举报