利用HTML属性定义Ajax支持:intercooler.js
jopen
10年前
这是一个很小的JS库,让你能够使用简单,声明式HTML属性来为你的Web应用添加AJAX支持。
<-- This button posts to the /example/click URL when it is clicked --> <button ic-post-to="/example/click"> Click Me! </button> <-- This span is bound to a URL that returns an updated version of the span when the button is clicked --> <span ic-src="/example/click"> You have not yet clicked the button </span>