BCA

WEB PROGRAMMING LAB

PROGRAM 1 PROGRAM 2 PROGRAM 3 PROGRAM 4 PROGRAM 5 PROGRAM 6 PROGRAM 7 PROGRAM 8 PROGRAM 9 PROGRAM 10 PROGRAM 11 PROGRAM 12 PROGRAM 13 PROGRAM 14 PROGRAM 15 . . .

8.Create a webpage to convert a given text from uppercase to lowercase using JavaScript.

OUTPUT:
ENTER TEXT :

Click the button to convert the string to uppercase letters.

 
 

 
<html>
<body>

ENTER TEXT :<input id="first" value=""> </input>
<p>Click the button to convert the string to uppercase letters.</p>

<button onclick="myFunction()">Try it</button>

<p id="demo"></p>

<script>
function myFunction() {
  var str = document.getElementById("first").value;
  var res = str.toUpperCase();
  document.getElementById("demo").innerHTML = res;
}
</script>

</body>
</html>