RJS参考之JavaScriptElementProxy

JavaScriptElementProxy是真实DOM对象的proxy,可以代理任何对DOM对象的JavaScript方法调用
还有一些加强的非JavaScript方法可以调用:

replace_html(*options_for_render)

Replaces the innerHTML of the DOM object. See the JavaScriptGenerator#replace_html() method for more information.

replace(*options_for_render)

Replaces the outerHTML for the DOM object. See JavaScriptGenerator#replace() method for more information.

reload

Reloads the content for the element by re-rendering a partial with the same name as the DOM element's id.

你可能感兴趣的:(JavaScript,html)