如何在 Lotus Notes 中使用 javascript 选中/取消选中复选框

发布于 2024-09-06 16:02:03 字数 144 浏览 0 评论 0原文

如何在 Lotus Notes 中使用 javascript 选中/取消选中复选框?

我尝试了很多不同的 javascript 代码,但没有一个起作用......

输入类型复选框位于名为 form1 的表单内......

谢谢

How to check/uncheck a checkbox with javascript in lotus notes?

I´ve tried a lot of different javascript codes but none worked....

the input type checkbox is insidea form called form1..

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

柒夜笙歌凉 2024-09-13 16:02:03

查看 Domino 生成的网页的源代码并确定复选框的名称。您正在寻找一个名为 type="checkbox" 的 HTML 标签。获取该复选框的 id 并使用该 id 替换下面代码的“”部分。

document.form1.<YOUR CHECKBOX ID HERE>.checked = true;

例如,如果复选框名为“mycheckbox”,则代码将为:

document.form1.mycheckbox.checked = true;

如果需要在选中和未选中之间切换复选框,则可以使用此代码,该代码只是将复选框设置为相反的状态。

document.form1.mycheckbox.checked = !document.form1.mycheckbox.checked;  

View the source for the Web page produced by Domino and determine what the name of your checkbox is. You're looking for an HTML tag called with a type="checkbox". Get the id of that checkbox and use that id to replace the "" part of the code below.

document.form1.<YOUR CHECKBOX ID HERE>.checked = true;

For example, if the checkbox is named "mycheckbox", the code would be:

document.form1.mycheckbox.checked = true;

If you need to toggle the checkbox between checked and unchecked, you can use this code, which just sets the checkbox to the opposite state.

document.form1.mycheckbox.checked = !document.form1.mycheckbox.checked;  
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文