javascript - Single page applications and <form> elements -


are there still benefits of using <form> element instead of let's <div> element in context of single page application? purpose of <form> element makes sense me if "form" submission isn't made ajax call (i'm talking more traditional way of submitting form, input/button of type "submit" , action attribute of form element describes url call), otherwise not see it's utility (maybe search engines?).

  1. semantically, using <form> clearer <div>.
  2. if still want form work without javascript, you'd better choose <form> (since used word application, may not considered though).
  3. more importantly, it'll painful of using <div> if care accessibility.

Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -