KRL - 如何获得关注字段的价值?
我正在查看页面上发生变化的字段。
watch("#searchbox","change");
如何获取更改后触发的规则中字段的新值?
我有这样的规则,
rule get_update is active {
select when web change "#searchbox"
....
}
我不知道如何获得新值。我无法通过提交来观看它。
谢谢
I am watching a field on a page with a change.
watch("#searchbox","change");
How do you get the new value of the field in the rule that fires after it changes?
I have a rule like this
rule get_update is active {
select when web change "#searchbox"
....
}
I cannot find out how to get the new value. I cannot use watch it with a submit.
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我将猜测我认为您想要做什么:
您在页面上有一个输入,当用户输入输入时,您希望能够引发一个事件并从用户的输入中获取新值正在输入,这样您就可以对他们输入的内容做出反应。
基于我所做的假设:
监视操作不是您真正想要使用的,因为它只会引发正在监视的操作的事件,并且不随事件一起发送任何其他数据。您将需要编写一些自己的自定义 JavaScript 来
以下是取自 http://kynetxappaday.wordpress.com/2010/12/16/day -8-raise-web-events-from-javascript/ 说明使用 JavaScript 中的参数引发 Web 事件
I am going to guess what I think you are trying to do:
You have an input on a page and when a user types in the input, you want to be able to raise an event and get the new value from the input that the user was typing into so you can react to what ever it is that they typed in.
Based on the assumptions I have made:
The watch action is not what you really want to use because it only raises an event on the action that it is watching and doesn't send any other data along with the event. You will want to write some of your own custom JavaScript to
Here is some sample code taken from http://kynetxappaday.wordpress.com/2010/12/16/day-8-raise-web-events-from-javascript/ that illustrates raising a web event with a parameter in JavaScript