eval

文字列を評価

構文

eval(string)

例文

<html>
<head>
<title>eval</title>
</head>

<body>

<!--文字列を評価のサンプル-->
<script type="text/javascript">
document.write(eval("2+5")+"<br>");
var x=10;
document.write(eval(x+30)+"<br>");
</script>

</body>
</html>

関連記事

スポンサーリンク

cheetan.php

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

上に戻る