js右键菜单,支持IE浏览器,超级方便

js代码

$(document).on("contextmenu", "[class='xxx']", function (event) {
            let items = [
                {
                    title: '修改', icon: 'ion-edit', fn: function edit() {

                    }
                },
                {
                    title: '删除', icon: 'ion-android-delete', fn: function del() {
                    }
                }
            ]
            basicContext.show(items, event.originalEvent)
        })

注意此处需要添加引用!

点击免费获取

提取码:k92n

猜你喜欢

转载自www.cnblogs.com/mushuizzz/p/11840192.html
今日推荐