更新时间:2022-10-15 09:41:34
You can do this:
var $html = $('<iframe width="854" height="480" src="http://www.***.com/embed/gYKqrjq5IjU?feature=oembed" frameborder="0" allowfullscreen></iframe>');
var str = $html.prop('outerHTML');
console.log(str);
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>