开发者

JSTL: Check if Submit was clicked

How can I check if the S开发者_高级运维ubmit button was clicked in JSTL?


Make sure the button has a name attribute so that when it's pressed, an associated request parameter will be submitted. For JSTL, it then becomes as simple as checking any other request param: ${param.nameOfTheButton}.


I dont think you can check if the submit button was clicked or not using JSTL. But you can know which submit button was clicked inside a servlet etc... for example if the button is

<input type="submit" name="Go"/>

for jsps use ${param.Go} for servlets use request.getParameter("Go");

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜