<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=shift_jis'>
<title>ShowCatyScript</title>
<script>
function showCatyScript() {
var caty = document.getElementById("caty");
var text = caty.innerHTML;
text = text.replace("<?caty-scrit", "");
text = text.replace("?>", "");
alert(text);
}
</script>
<style>
#caty {display: none}
</style>
</head>
<body>
<textarea id="caty">
<?caty-scrit
{"foo": 1, "bar": "hello"}
?>
</textarea>
<button onclick="showCatyScript();"> Show Caty Script</button>
</body>