Why doesnt work this code one safari,chrome and internet explorer.. Only works with Opera and Firefox...
  $("#txtAd").keypress(function (e) {
    var code = e.keyCode || e.which;
    if (code == 9) {
        $("#txtSoyad").val(开发者_高级运维'');
    };
});
jQuery abstracts that so you don't have to :)
To determine which character was entered, examine the event object that is passed to the handler function. While browsers use differing properties to store this information, jQuery normalizes the
.whichproperty so you can reliably use it to retrieve the character code.
Source.
Use e.which, no need to use || short circuit evaluation trick.
Though in saying that, your code did work for me in Chrome 10.
Are you sure $("#txtSoyad") is a valid selector, and has selected what you want? Output the length property, if you don't see 1, it isn't selecting it correctly.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论