动态获取html页面的内容,并且取其中的某块元素的方法

    xiaoxiao2023-06-15  148

     $.ajax({   url: " http://192.168.1.59:8888/app-tpl-webapp/tpl/design.html",   async:false,   type:'post',   dataType:'html',   success:function(data) {       console.log("-------------------------------------------------");       var htmlTextText = $('div').html(data);       console.log($('div').html(data).eq(1).find("#workspace-body"));       $('div').html(data).eq(1).find("link,script,style").each(function(index,domEle){        //$("head").append($(domEle));        console.log(domEle);       });       console.log("-------------------------------------------------");    //自动为布局文件的html中加上id      }   });
    最新回复(0)