Home > other >  Layui HTML real-time preview function?
Layui HTML real-time preview function?

Time:12-02



Business code would only write four years of development, the distributed high concurrency also can't be a programmer? - & gt;>



The function changeHtmlCode (obj) {
Var HTML="& lt; Div style="width: 100 px; height:100px; Background: red; '& gt; Sdf
";
Var previewFrame=document. GetElementById (" preview_html_code ");
Var. Preview=previewFrame contentDocument | | previewFrame. ContentWindow. Document;
The preview. The open ();
The preview. Write (HTML);
The preview. The close ();
}
</script>
@ xian xin: hello, can you tell me the layui realize real-time preview function as shown in the HTML?

CodePudding user response:

This is the right code
  • Related