gpt4 book ai didi

javascript - struts 1.1 - 如何设置 html :submit through JS 的属性

转载 作者:行者123 更新时间:2023-11-28 00:05:37 29 4
gpt4 key购买 nike

我的 Struts 1.1 JSP 文件中有一个带有提交按钮的表单:

<html:form ...>
<html:submit onclick="onupload();">
Upload
</html:submit>
</html:form>

现在,我想更改 onupload() 函数中 submit 按钮的值。在常规 HTML 中,我使用 document.getElementByName 执行此操作,但在 html:submit 标记中,未定义属性 name。所以,我不知道如何更改按钮的值。

最佳答案

使用styleNamestyleId 属性分别设置提交标签的名称或id。

这些属性记录在 taglib 文档中。

关于javascript - struts 1.1 - 如何设置 html :submit through JS 的属性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/18642457/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com