js、jq问题:如何让一个或多个标签中的内容自动复制到另一个div标签中

2025-03-09 22:29:11
推荐回答(2个)
回答1:



    
        
        Document
        " target="_blank">http://code.jquery.com/jquery-2.1.4.min.js">
        
        $(window).ready(function(){
 
            var h3=$("h3.a");
            for(i=0,len=h3.length;i                 
                if($(h3[i]).text()!=""){
                    $(".catalog-li").append(""+$(h3[i]).text()+"");
                }
            }
        })
        
    
    
        

        1
        2
        3
        4
        5
        N...
    

回答2:




    
    Document


内容一
内容二
内容三
内容四
内容五





相关问答
最新问答