zoukankan      html  css  js  c++  java
  • 如何点击添加按钮时添加按钮

       function getInsertBtn(){
                  //创建input元素
            var inp = document.createElement("input");
            inp.type = "button";
            inp.addEventListener('click', function () {
                openLayerUrl('@Url.Action("PartialChildNodeView", "UEditor")');getBtnValue(this.value);printBtnValue()
            })
            let addButtonLength = Number($('.addButton>input').length)+1;
            inp.value = "知识点" + addButtonLength;
            $(".addButton").append($(inp))
             
        }
    
        <div>
            <input style="float:left" id="zhenjiazhishi" type="button" name="jushouda" value="增加知识按钮" onclick="getInsertBtn()" />
        </div>
    
      <div class="addButton">
            <input id="jichuzhishi" type="button" name="jushouda" value="知识点1" onclick="openLayerUrl('@Url.Action("PartialChildNodeView", "UEditor")');getBtnValue(this.value);printBtnValue()" />
        </div>
    
  • 相关阅读:
    文件上传.py
    文件下载.py
    Visual SVN IIS反向代理设置
    开发者工具
    Linux
    装饰器
    面向对象
    django异常--数据库同步
    浅谈 Mysql
    python网络编程系列
  • 原文地址:https://www.cnblogs.com/sunliyuan/p/8891467.html
Copyright © 2011-2022 走看看