jquery事件绑定

 

$('#id').bind('事件名',function(){

//

}

);

 //===========================

//判定按键

 $('#tbInput').bind('keypress', function(e) {
                var e = window.event ? window.event : e;
                if (e.keyCode == 39) {
                    alert("39");
                }
            }); 

//注意置焦

$("#myinput")[0].focus();


 

posted @ 2010-04-01 15:18  迅捷网络[来送福利]  阅读(222)  评论(0编辑  收藏  举报