Previous Example-|-Next Example-|-Return to Chapter Listing

Example 10.3:
Using Methods


The user inputs a string which is converted to upper case using the 'toUpperCase' method.


This is the script we used: <SCRIPT LANGUAGE="JavaScript"> <!-- var sText var sUpper sText = prompt("Input a string in lower case","") sUpper = sText.toUpperCase() document.write("The string in Upper case is: <P><H3>" + sUpper + "</H3>") </SCRIPT>
Previous Example-|-Next Example-|-Return to Chapter Listing