request.getParameter("querystring-name");
<html> <head> <title>ThaiCreate.Com JSP Tutorial</title> </head> <body> <form name="frmAdd" method="get" action="get.jsp"> Input Your Information <br> Name <input type="text" name="txtName"> Email <input type="text" name="txtEmail"> <input type="submit" value="Submit"> </form> </body> </html>
<html> <head> <title>ThaiCreate.Com JSP Tutorial</title> </head> <body> <% String strName = request.getParameter("txtName"); String strEmail = request.getParameter("txtEmail"); out.println("Name : " + strName); out.println("<br>"); out.println("Email : " + strEmail); %> </body> </html>
<html> <head> <title>ThaiCreate.Com JSP Tutorial</title> </head> <body> <a href="get.jsp?Name=Weerachai Nukitram&[email protected]">View</a> </body> </html>
<html> <head> <title>ThaiCreate.Com JSP Tutorial</title> </head> <body> <% String strName = request.getParameter("Name"); String strEmail = request.getParameter("Email"); out.println("Name : " + strName); out.println("<br>"); out.println("Email : " + strEmail); %> </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท