Java Script Code

By | April 24, 2018

<!DOCTYPE html>
<html>
<body>

<h2>JavaScript Statements</h2>

Type any Number Here<input type=”text” id=”aaa”>
<input type=”button” value=”Click here” onClick=”rrr()”>

<script>
function rrr(){
var btbt=document.getElementById(“aaa”).value;
document.getElementById(“dddd”).innerHTML=btbt;
}

</script>
<p id=”dddd”>This is empty</p>
</body>
</html>

 

RESULT

JavaScript Statements

Type any Number Here

This is empty

Leave a Reply

Your email address will not be published. Required fields are marked *