My favorites | Sign in
Project Home Downloads Wiki Issues Source
Checkout   Browse   Changes    
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Caracteres escapados</title>

<script type="text/javascript">

function escapar(){
document.getElementById("textoescapado").value = escape(document.getElementById('texto').value);
}

</script>

</head>
<body>
<h1>Caracteres escapados</h1>

<form id="myform">
<label for="texto">Escribe un texto:</label><br/>
<textarea id="texto" rows="10" cols="30"></textarea>
<br/>
<label for="textoescapado">El texto escapado es:</label><br/>
<textarea id="textoescapado" rows="10" cols="30"></textarea>
<br/>
<button onClick="escapar();return false;">Escapar el texto</button>
</form>

<br><br>
<hr>
Art&iacute;culo disponible en: <a href="http://lineadecodigo.com/javascript/escapar-caracteres-en-javascript/">http://lineadecodigo.com/javascript/escapar-caracteres-en-javascript/</a><br/>
<a href="http://lineadecodigo.com" title="Linea de Codigo">lineadecodigo.com</a>

</body>
</html>

Change log

r171 by vcuervo on Sep 14, 2009   Diff
Escapar caraceters en javascript
Go to: 
Project members, sign in to write a code review

Older revisions

All revisions of this file

File info

Size: 1105 bytes, 35 lines
Powered by Google Project Hosting