|
-
Jun 17th, 2003, 08:46 PM
#1
Thread Starter
Need-a-life Member
Plain text
How do you get to show a plain text in an ASP? I want to show some html code (in the page), so that the user can copy and paste it (in their pages). But I want the "<" to be pasted as "<" and not like "<"... and all that stuff.
How can I do this?
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Jun 17th, 2003, 11:31 PM
#2
Frenzied Member
You need use a <textarea> for your code, otherwise "<" and some other symbols will be replaced.
-
Jun 17th, 2003, 11:45 PM
#3
Thread Starter
Need-a-life Member
Emiliano F. Martín
If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
Encourage the person who helped you to keep doing it, and give him the points he deserves.
MP3 Organizer: Freeware to logically organize all your MP3s.
-
Jun 17th, 2003, 11:48 PM
#4
Frenzied Member
-
Jun 17th, 2003, 11:56 PM
#5
Frenzied Member
Here:
Code:
<html>
<head>
<title>Code Sample</title>
</head>
<script language="JavaScript">
function copyContent(elID){
var el=document.getElementById(elID)
el.focus();
el.select();
document.execCommand('Copy');
alert("Code Copied!");
}
</script>
<body>
<textarea id="codeSamp" rows="10" cols="100" style="border:none;">This is a test <font face="tahoma">Tahoma</font></textarea>
<br><input type="button" value="Copy Code to Clipboard" onclick="copyContent('codeSamp')">
</body>
</html>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|