CodeLab
Show Output
 
xxxxxxxxxx
17
 
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
<meta charset="utf-8">
5
<title>jQuery Set Value of Input Text Box</title>
6
<script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
7
<script>
8
$(document).ready(function(){
9
    $("#myInput").val("https://");
10
});
11
</script>
12
</head>
13
<body>
14
    <label>Enter Website URL:</label>
15
    <input type="text" id="myInput">
16
</body>
17
</html>
 

在微博、微信、公众号、小程序分享此示例。 如果您觉得有帮助,请给我们一个赞。