更新时间:2022-05-07 05:13:23
如果可用,请使用insertAdjacentHTML,否则使用某种回退。根据 https://developer.mozilla.org/en/DOM/element.insertAdjacentHTML
Use insertAdjacentHTML if it's available, otherwise use some sort of fallback. insertAdjacentHTML will be supported in Firefox 8, and is also supported in Safari 4, Chrome, IE and Opera, according to https://developer.mozilla.org/en/DOM/element.insertAdjacentHTML
div.insertAdjacentHTML( 'beforeend', str );