Friday, February 24, 2023

Java Script

 <!DOCTYPE html>

<html>

<body style="text-align:center;">

<h1 style="color:green;">

MLC Computer Korba

</h1>

<h2>Text value property</h2>

<p>

Change the text of the text field,

and then click the button below.

</p>

Name:<input type="text" id="myText" value="Student">

<button type="button" onclick="myFunction()">

Try it</button>

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

<script>

function myFunction() {

var x = document.getElementById("myText").value;

document.getElementById("demo").innerHTML = x;

}

</script>

</body>

</html>


No comments:

Post a Comment

Visual Basic .Net Programming

 Program 1 Sum of Two Numbers Form Design for Sum of Two Numbers Coding for OK Button Dim a, b, c as integer a=textbox1.text b=textbox2.text...