In previous lesson we talk about jQuery load method and in this lesson we are going to learn about jQuery get and post methods.
Here we use two ways to display the input form values. 1. In first way we find all id with content and return their values. 2. In second way we use jQuery serialize() method. This method is use for return filter data. Serialize use default name values of boxes for return values. If we input in 1 box - ankit and in second box- kalra So it return as name = ankit & content = kalra. We use here preventDefault method only for display values on console screen it's stop the form for submit and returns the values on console screen.
In below example first we create some files for our use -
1. demosave.php
2. demoload.php
3. demodata.txt