post data from a form in json format : I have two html pages : 1.html and 2.html
I want to post data from a form in 1.html to 2.html
I want to store data from form in 1.html in json and then post it to 2.html without going to 2.html when I click on submit button and parse json in 2.html and use them.
1.html :

    

    <body>
        <form action="2.html" method="POST">
            <input type="text" name="material" value="material" readonly>
            <input type="text" name="Unit" value="Unit" readonly>
            <button type="submit" id="add">add</button>
        </form>
    </body>



can anyone help? i need it soon. thanks

