[Javascript / jQuery] 設定 Default Button
1: $(function() {
2: $("form input").keypress(function (e) {
3: if ((e.which && e.which == 13) || (e.keyCode && e.keyCode == 13)) {
4: $('button[type=submit] .default').click();
5: return false;
6: } else {
7: return true;
8: }
9: });
10: });