我想在点击后禁用按钮但使用request.getParameter()。我在form tag
中编写代码:
<button name="Save" value="Save" onclick="this.disable=true;"> Save</button>
之后:
<%
if(request.getParameter("Save")!=null)
{
%>
<SCRIPT TYPE="text/javascript">
this.disable=true;
</script>
<%
%>`
当然我知道我可以使用onClick():<button name="Save" value="Save" onclick="this.disable=true;"> Save</button>
但我希望以另一种方式处理请求。
答案 0 :(得分:0)
You can't use the request parameter like you did because the request only exist after you submit. You need to write it completely in JavaScript. On click disable button.