parseFloat

文字列を浮動少数に変換

構文

parseFloat(string)

引数

string=文字列

例文

<html>
<head>
<title>parseFloat</title>
</head>

<body>

<!--文字列を浮動少数に変換のサンプル-->
<script type="text/javascript">
document.write(parseFloat("10") + "<br>");
document.write(parseFloat("10.00") + "<br>");
document.write(parseFloat("10.33") + "<br>");
document.write(parseFloat("34 45 66") + "<br>");
document.write(parseFloat(" string 60 ") + "<br>");
</script>

</body>
</html>

関連記事

スポンサーリンク

HAVING句 集計関数の結果を条件とした絞込み

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

上に戻る