val("Text")
JavaScript
$("#myElement1").val("Hello");
Html
<html>
<!-- heading -->
<head>
<meta charset="utf-8">
<title>Example</title>
</head>
<!-- page -->
<body>
<!-- connect the library jQuery -->
<script src="https://dir.by/example_lib/jquery/jquery-3.3.1.min.js"></script>
<!-- HTML Elements -->
<input type='text' id="myElement1" value=''>
<input type='button' id="myElement2" value=''>
<!-- Java Script -->
<script>
// the page has opened
$( function()
{
// looking for an element by ID and change value
$("#myElement1").val("Hello");
$("#myElement2").val("World");
});
</script>
</body>
</html>