https://www.w3school.com.cn/jquery/manipulation_replacewith.asp
replaceWith() 方法用指定的 HTML 內容或元素替換被選元素。replaceWith() 與 replaceAll() 作用相同。差異在於語法:內容和選擇器的位置,以及 replaceAll() 無法使用函數進行替換。
語法:
https://www.w3school.com.cn/jquery/manipulation_replacewith.asp
replaceWith() 方法用指定的 HTML 內容或元素替換被選元素。replaceWith() 與 replaceAll() 作用相同。差異在於語法:內容和選擇器的位置,以及 replaceAll() 無法使用函數進行替換。
語法: