扫一扫分享
umbrella.js是一个现代且性能卓越的javascript库。它可以完成:
umbrella.js例子
// Simple events like jquery
u("button").on('click', e => {
alert("Hello world");
});
// Handle form submissions
u('form.login').handle('submit', async e => {
const user = await fetch('/login', {
method: 'POST', body: new FormData(e.target)
}).then(res => res.json());
window.href = '/user/' + user.id;
});
手机预览