This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] GUI Composer :如何在 JavaScript 中读取输入字段中的值

Guru**** 1831610 points
请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/1330997/gui-composer-how-to-read-the-value-from-an-input-field-in-javascript

我有一个 ID 为 "input_6"的输入小工具(GC-wdiet-input)。

在 JavaScript 函数中、如何获取 input_6的值?

例如、我尝试过以下操作:

VAR 输入= GcWidget.querySelector ('#input_6').value;

VAR s =`输入为${input}`;

告警;

这不起作用。  输出字符串为"Input is undefined"

谢谢!

  • 请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

    尊敬的 Mark:

    您能否确认您正在使用哪个版本的 GUI Composer?

    谢谢