[removed] pass an object as the argument to a onclick function inside string

前端 未结 3 1419
温柔的废话
温柔的废话 2020-12-30 00:15

I would like to pass an object as parameter to an Onclick function inside a string. Something like follwing:

function myfunction(obj,parentobj){ 
   var o=do         


        
3条回答
  •  醉话见心
    2020-12-30 01:02

    function myfunction(obj,parentobj){ 
            var o=document.createElement("div");
             o.innerHTML=""; 
                                      parentobj.appendChild(o.firstChild);
                } 
        // my similar problem, function a was called in a jsonArray loop in the dataTable initiation
        function a(data, type, obj) {
                             var str = "";
                             str += "";
                             str +="[选择]";
                             str += "";
                             return str;
                                                }
    function chooseData1(data){
                            console.log(data);
                      }
    

提交回复
热议问题