Indenting HTML code in a textarea

M

martin.igle+ASP

the question is simple... is there any way to indent HTML code inside a
simple textarea?...

tnx!
martin
 
M

McKirahan

the question is simple... is there any way to indent HTML code inside a
simple textarea?...

tnx!
martin

You can use Tabs or spaces with a fixed width font.


<html>
<head>
<title>ta_tab.htm</title>
</head>
<body>
<form name="form1">
<textarea name="text" cols="80" rows="10"></textarea>
<textarea name="area" cols="80" rows="10"
style="font-family:Courier">Hello World!</textarea>
</form>
<script type="text/javascript">
document.form1.text.value = "Hello\tWorld!";
</script>
</body>
</html>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,148
Messages
2,570,838
Members
47,385
Latest member
Joneswilliam01

Latest Threads

Top