简体   繁体   English

Adobe LiveCycle中单选按钮的Javascript

[英]Javascript for radio buttons in Adobe LiveCycle

How can I do the following: 1. I have a table with columns for Yes and No. I wanted a radio button to a cell (one for Yes and another for No) that when I click Yes, No is off and if click No, Yes is off. 如何执行以下操作:1.我有一个表,其中的列分别为“是”和“否”。我想要一个单元格单选按钮(一个是“是”,另一个是“否”),当我单击“是”时,否是关闭的,如果单击“否” ,是关闭。

  1. How can I make the radio buttons work that if I click the radio button (say the Yes button) it is on (similar to #1 above) but if I click it again, it turns off without turning on the other radio button (the No button). 我如何使单选按钮起作用,如果我单击了单选按钮(例如“是”按钮),它就打开了(类似于上面的#1),但是如果再次单击它,它就关闭了而没有打开另一个单选按钮(即没有按钮)。

I really would appreciate any help. 我真的很感谢您的帮助。

Regards, 问候,

In Set up the two (eg rbYes & rbNo) buttons. 在设置两个按钮(例如rbYes和rbNo)中。 In the click event for the Yes add: 在“是”的点击事件中添加:

rbNo.rawValue = "";

In the click event for the No add: 在No添加的click事件中:

rbYes.rawValue = "";

This will turn the buttons on and off as the other one is clicked. 单击另一个时,这将打开和关闭按钮。

I'll get some code together for the other option of double clicking and update this soon. 我将为双击的其他选项提供一些代码,并尽快进行更新。

Hope it helps. 希望能帮助到你。

Steve 史蒂夫

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM