输入:

[{
    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>

 

相关文章:

  • 2021-10-27
  • 2021-07-17
  • 2022-12-23
  • 2021-04-14
  • 2021-07-16
  • 2021-12-09
  • 2022-12-23
猜你喜欢
  • 2022-02-25
  • 2022-01-21
  • 2021-12-30
  • 2021-07-05
  • 2021-08-10
相关资源
相似解决方案