<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Example</title>
<script language="JavaScript" type="text/javascript">
<!--
function showTags()
{
str=document.getElementById("txtCode").value;
str=str.replace(/[&]/g,'&');
str=str.replace(/[<]/g,'<');
str=str.replace(/[>]/g,'>');
str=str.replace(/[\n]/g,'<br>');
//document.getElementById('show').innerHTML=str;
document.getElementById('txtCodeop').value = str;
}
//-->
</script>
</head>
<body onload="showTags()">
<div id="show"></div>
<TextArea id="txtCode" name="txtCode"></textArea>
<input type=button id=btnSubmit name=btnSubmit onclick="Javascript:showTags();">
<TextArea id="txtCodeop" name="txtCodeop"></textArea>
</body>
</html>
1 comment:
Its very useful to me thanks for your code
Post a Comment