Code:
<!DOCTYPE html>
<html>
<body>
<p>Click the button to convert the string to uppercase letter</p>
<button onclick="myfunction()">
Try it
</button>
<p id="demo"></p>
<script>
function myfunction()
{
var str=document.form.text.value;
var res=str.toUpperCase();
document.getElementById("demo").innerHTML=res;
}
</script>
<form name="form">
<input type="text" name="text" value="">
</form>
</body>
</html>
No comments:
Post a Comment