查看: 7579|回复: 3

o2.dl

升级   0.22%

89

主题

181

回帖

22

积分

注册会员

Rank: 2

积分
22
发表于 2023-10-12 00:32:10 | 显示全部楼层 |阅读模式
您好:

     var dialog = o2.DL.open({
    "style": "o2",
    "title": "弹出框标题",
    "width": "400",
    "height": "200",
    "isMax": false,
    "isClose": true,
    "isResize": true,
    "isMove": true,
    "isTitle": true,
    "offset": { "x": -200, "y": -100 },
    "mask": true,
    "content": new Element("div888"),
    "container": this.form.getApp().content,
    "duration": 200,
    "buttonList": [
        {
            "text": "确定",
            "action": function (data) {
                debugger
      
-------------------------------------------获取myInput999的值   这里怎么取值呢,
-------------官网 var value = this.node.getElement("input").get("value");,取不到
                dialog.close();
            }.bind(this)
        },
        {
            "text": "取消",
            "action": function () {
                dialog.close();
            }.bind(this)
        }
    ],
    "onPostLoad": function () {
        console.log("-onPostLoad-");
        new Element("div", {id: "div199"}).adopt(
    new Element("p", {text: "这是内容区域"}),
    new Element("input", {type: "text", name: "myInput999"})
).inject(this.content);
        // ...code...
    },
})
回复

使用道具 举报

升级   100%

139

主题

1万

回帖

4万

积分

超级版主

Rank: 8Rank: 8

积分
41458
发表于 2023-10-12 10:09:18 | 显示全部楼层
很多种方式,比如:data.node.querySelector("input").value
回复

使用道具 举报

升级   0.22%

89

主题

181

回帖

22

积分

注册会员

Rank: 2

积分
22
发表于 2023-10-12 10:27:01 | 显示全部楼层
论坛管理员 发表于 2023-10-12 10:09
很多种方式,比如:data.node.querySelector("input").value

好的,谢谢,我用的 getElementById
回复

使用道具 举报

升级   100%

139

主题

1万

回帖

4万

积分

超级版主

Rank: 8Rank: 8

积分
41458
发表于 2023-10-13 09:43:20 | 显示全部楼层
回复

使用道具 举报

发表回复

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

联系客服 关注微信 下载APP 返回顶部 返回列表
viewthread