我想在海边2.9做这样的事情
html button onClick: (html jQuery ajax serialize: (html jQuery this); script: [:s | s << (s jQuery id: stratId) append: [html text: 'bing'. html break]]); callback: [2 inspect]; with: 'add option'.
而且我希望我的div与stratId相加,但我的吱吱声图像中没有检查窗口?这样做的正确方法是什么?
答案是在JQueryInstance的方法注释的第二部分>> #serializeThis:
"Serialize the receiving element. Note that this might not work for all form
elements: (1) for check-boxes and multi-select lists Seaside internally depends on an additional hidden form element that is generated automatically, instead use #serializeThisWithHidden (2) submit-button callbacks are ignored, instead use a normal callback to trigger specific code evaluation."
而是将您的回调代码放入jQuery回调本身,即#script:block.