📜  替换然后替换回来 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:44.039000             🧑  作者: Mango

代码示例1
function replaceContentInContainer(target,source) {
    var temp = document.getElementById(target).innerHTML;
    document.getElementById(target).innerHTML = document.getElementById(source).innerHTML;
    document.getElementById(source).innerHTML = temp;
}