Saturday, August 31, 2013

Previous Interview Question Next Interview Question
Home

How is form submission possible via javascript?


We can achieve the desired form submission by using the function document.forms[0].submit().

It must be noted that the 0 in the piece of code given above refers to the form index. Say we have multiple forms on a particular page. To make all the form procession unique, we give each form index numbers. The first form will have the index number as 0. The second form will have an incremented number, 1. The third will have 2 and so on.

Previous Interview Question Next Interview Question
Home

0 comments :

Post a Comment