| 目次 |
|---|
|
・String.escapeHTML |
<html>
<head>
<title>String.escapeHTML - HTMLをエスケープした値を得る</title>
</head>
<!--HTMLをエスケープした値を得るのサンプル-->
<script type="text/javascript" src="/js/prototype.js"></script>
<script type="text/javascript">
<!--
function execute() {
var str = '<b>string</b><i>string</i>';
alert(str.escapeHTML()); // HTMLをエスケープした値を得る
}
//-->
</script>
<body>
<button onclick="execute()">サンプル実行</button>
</body>
</html>