Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
下面是我试图尝试的。
取决于收到的 http 请求参数,我需要显示成功按钮或失败按钮。
能够在servlet中实现这个,如何在javascript中实现这个条件标签?
提前致谢
如果你有button = someButton()
button = someButton()
然后再做一个 if 语句:
if (httpRequestParamReceived) { button.value = "Success"; } else { button.value = "failure"; }
像这样的东西,但是您应该替换所需的值,因为您没有指定要更改的参数和按钮。