HTML을 iFrame으로 설정해야합니다. (iframe이의 SRC가 null입니다.) 예 : I는 웹 메소드 호출에서 문자열 다음 얻을 : 문자열의 =머리글과 본문 태그가있는 HTML을 iframe에 설정하는 방법
<html>
<head>
<style type="text/css"> <!-- .some dynamicaly generated css> </style>
<link id="css1" type="text/css" rel="stylesheet" href="1.css" /></head>
<body style="padding:0; margin:0;" tabIndex="-1">
--- some HTML elements ------
<script type="text/javascript">
---some script ---
</script>
</body>
</html>
내가 iframe이에이 문자열을 설정해야합니다. 하지만 iframe.innerHTML을 사용하면 head 태그와 body 태그를 제거합니다.
도와 주실 수 있습니까? 문자열에 무언가를 추가하거나 iframe에 속성을 추가해야합니까?
미리 감사드립니다.
$.html(innerHtml);
은 왜 어쨌든이 원하는거야라고 할 수 있습니까? can not 그냥 src를 iframe에로드하고 파일/스크립트에서 내용을로드 할 수 있습니까? – HerrSerker도메인 간 문제로 인해 src를 사용할 수 없습니다. –
도메인에없는 경우 동영상을 표시 할 권리가 있습니까? – HerrSerker