houdongen 发表于 2023-10-12 00:32:10

o2.dl

您好:

   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...
    },
})

论坛管理员 发表于 2023-10-12 10:09:18

很多种方式,比如:data.node.querySelector("input").value

houdongen 发表于 2023-10-12 10:27:01

论坛管理员 发表于 2023-10-12 10:09
很多种方式,比如:data.node.querySelector("input").value

好的,谢谢,我用的 getElementById

论坛管理员 发表于 2023-10-13 09:43:20

:handshake
页: [1]
查看完整版本: o2.dl