encodeURIComponent

URLエンコード

構文

encodeURIComponent(string)

引数

string=文字列

例文

<html>
<head>
<title>encodeURIComponent</title>
</head>

<body>

<!--URLエンコードのサンプル-->
<script type="text/javascript">
document.write(encodeURIComponent("http://www.yahoo.co.jp/")+ "<br>");
document.write(encodeURIComponent("&/?:@#=,+$"));
</script>

</body>
</html>

関連記事

スポンサーリンク

Ruby on Railsをクリックだけで起動する方法

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る