Etiket ve type olarak button tanımlamak

If your buttons are not for submitting form data to a server, be sure to set their type attribute to button. Otherwise they will try to submit form data and to load the (nonexistent) response, possibly destroying the current state of the document.

Özeti, type button yapmazsan form verilerini sunucuya göndermeye ve response döndürmeye çalışır.
 
Hocam eğer bir form içerisinde bir button koyarsan o otomatik olarak submit button (formu gönderme) olarak çalışır. Ancak biz başka işler için kullanmak istiyorsak butonu type="button" deriz. Submit button için de type="submit" deriz. Umarım açıklayıcı olmuştur. El alışkanlığı olsun genelde sen form submit etmiyorsan type="button" yaz butonlarına.
 

Geri
Yukarı