为什么在按钮上使用.on('load', function () {不起作用?

3

工作中的.on('click'

没有问题。

myApp.onPageAfterAnimation('about', function (page) {
$$('#button1').on('click', function () {
alert('test');

不起作用的.on('load'

为什么?

myApp.onPageAfterAnimation('about', function (page) {
$$('#button1').on('load', function () {
alert('test');

这不是jQuery,而是Framework7。 - re1
什么是 #button1 标签?我认为没有 onload 事件。 - Alien
1个回答

3

onload事件仅支持HTML标签:

body, frame, iframe, img, input type="image", link, script, style

1
document$$(document).on('load', function() {}) 中也可以使用。 - KRONWALLED

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接