java - How to add id to action in HTML.form -
i have form:
<form method="post" action="/user/${id}"> <input type="text" value="${id}" placeholder="input id"> <button>get user</button> </form>
i need add input data uri, /user/23, 23 in inputed data.
do need have /user/23 uri? if don't, can use "/user/" action.
<form method="post" action="/user"> <input type="text" name="user_id" placeholder="input id"> <button>get user</button> </form>
then can get/handle proper id. like:
<%= request.getparameter("user_id")%>
Comments
Post a Comment