Math.toString() : toString : Math JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Math » toString »

 

Math.toString()







The toString() method returns a string value representing the object.












<html>
    <body>
    <script language="JavaScript">
    <!--
    function copy(){
        var result = Math.toString(Math.sqrt(45));
        document.form1.answer.value = result;
    }
    -->
    </script>
    <form name=form1>
    <input type="button" value="Get String" onClick='copy()'>
    <br>
    The result of toString is:
    <input type="text" name="answer" size=20>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Math
» toString