3

jQuery 的 event.preventDefault() 在 Firefox 無法作用

 2 years ago
source link: https://webber0928.blogspot.com/2016/10/jquery-eventpreventdefault-firefox.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

jQuery 的 event.preventDefault() 在 Firefox 無法作用

我在寫 event.preventDefault() 時,赫然發現 firefox 無法使用,後來才知道原來是只有 chrome 可以直接使用隱藏的參數,所以一般的寫法要怎麼寫呢?

function( event ) {
  event.preventDefault();
}

範例參考: http://stackoverflow.com/questions/4585970/jquery-event-preventdefault-not-working-in-firefox-jsfiddle-included

photo.jpg

By webber0928

一個小菜鳥工程師,對籃球還有夢想的男孩。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK