问答详情
源自:9-15 替换元素节点replaceChild()

交作业啦~~~

 function replaceMessage() {

        let b = document.querySelector('b');

        let i = document.createElement('i');

        let oldNodeParent = b.parentElement;

        i.innerText = b.innerText;

        oldNodeParent.replaceChild(i, b);

    }


提问者:再执 2021-01-17 14:49

个回答

  • 慕神3271549
    2021-02-26 10:24:52

    666!