How to append elements and events to iframe

now think about the append close button in iframe

<iframe id="iframe" class="iframe" src="https://www.imanet.org.cn/e/" frameborder="0" scrolling="no">
</iframe>

  var close="<div class="close-survey" onclick="closesurvey()"></div>"
           
    $("-sharpiframe").contents().find("body").append(close)

it"s no good to write this way

Mar.07,2021

$('-sharpiframe')[0].contentWindow.find('body')
Menu