文章出處

輸入:

[{
    tag:"ul",
    attribute:{
        class:"father6"
    },
    property:{
        className:"father"
    },
    children:[
    {
        tag:"li",
        attribute:{
            class:"son"
        }
    },
    {
        tag:"li",
        class:"son",
        children:[{
            tag:"a",
            attribute:{
                class:"son-a",
                href:"http://www.google.com"
            },
            property:{
                innerText:"跳轉到google"
            }
            
        }]
    }]
}]

輸出:

<ul class="father">
    <li class="son"></li>
    <li class="son">
        <a class="son-a" href="http://www.google.com">跳轉到google</a>
    </li>
</ul>

 


文章列表


不含病毒。www.avast.com
arrow
arrow
    全站熱搜
    創作者介紹
    創作者 大師兄 的頭像
    大師兄

    IT工程師數位筆記本

    大師兄 發表在 痞客邦 留言(0) 人氣()