<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Untitled Document</title>
<style type="text/css">
textarea {
width: 600px;
height: 200px;
}
</style>
</head>
<body>
<textarea id="src"></textarea>
<textarea id="desc"></textarea>
<button onclick='s()'>C</button>
<script type="text/javascript">
function c(str) {
return str.replace(/(['\\])/g, '\\$1');
}
function s() {
document.getElementById('desc').value = c(document.getElementById('src').value);
}
</script>
</body>
</html>
Tuesday, May 12, 2009
Test html code
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment