【问题标题】:Remove everything after first commas (,) from string In Adobe LiveCycle从 Adob​​e LiveCycle 中的字符串中删除第一个逗号 (,) 之后的所有内容
【发布时间】:2018-08-12 14:21:40
【问题描述】:

我有textfield1和textfield2,我想减少textfield2中逗号后的字符

示例:

文本字段1 =

这是芒果,颜色是绿色的

在文本字段2 =

这是芒果

我想用 if 和初始化/触发“逗号 (,)”

如果在 php 中是这样的:

remove everything after first comma from string in php

如果有人了解adobe live cycle,请提供帮助

【问题讨论】:

    标签: javascript forms adobe textfield livecycle-designer


    【解决方案1】:

    也许这样的事情应该在退出事件上做。

    var originalText      = textfield1.rawValue;
    var placeOfFirstComma = originalText.indexOf(",");
    var reducedText       = originalText.substring(0, placeOfFirstComma);
    textfield2.rawValue   = reducedText; 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2013-01-23
      • 2012-12-25
      • 1970-01-01
      • 2022-08-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-08
      相关资源
      最近更新 更多