Home > Web Front-end > JS Tutorial > Method to display HTML code in textarea text area_javascript skills

Method to display HTML code in textarea text area_javascript skills

WBOY
Release: 2016-05-16 19:18:09
Original
1543 people have browsed it

This is an iframe

To give you a reference:

Copy code The code is as follows:




This is textarea

Copy code The code is as follows:




<script> <br> function insert(){ <br> var oDiv=document.createElement("DIV"); <br> oDiv.innerHTML="<br><Font color = Red>red<BR></FONT><Font color = Blue>blue</font>"; <br> document.getElementById("txt").appendChild(oDiv); <br> }  <br> </script>
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template