Take input from user by using HTML field in doctype

Hello,
I have used HTML field in doctype in which I am displaying 3*3 matrix.Now I want to store the data entered by user into database. The problem is I am not able to get data in .js file in doctype. Detailed solution will be welcomed as I am newbie.

Please help.