在 Seaside JQuery 回调中获取 Javascript 接收器的值
我的问题类似于这个 - 如何获取 javascript this (这样我就可以获取它的值,假设它是表单文本输入)?我正在尝试将文本输入的值发送到您看到的回调:
html textInput id: #thingy;
onClick: (html jQuery ajax
callback:[:x | x inspect]
value:(html jQuery event currentTarget ????));
with: 'I am the value the poster wants to see inspected in the above callback block!'.
My question is similar to this - how do get what would be javascript this (so that I can get its value assuming its a form text input) ? I am trying to send the value of a text input to the callback you see:
html textInput id: #thingy;
onClick: (html jQuery ajax
callback:[:x | x inspect]
value:(html jQuery event currentTarget ????));
with: 'I am the value the poster wants to see inspected in the above callback block!'.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您想在单击时触发回调,只需在 onClick 事件上绑定 serializeThisWithHidden 即可。
从我的脑海中消失:)
If you want to fire the callback when you click simply bind serializeThisWithHidden on the onClick event.
Out of my head :)
要获取 ajax 回调中的值,您可以使用
To get the value in the ajax callback you would use