-
Notifications
You must be signed in to change notification settings - Fork 0
/
jQueryInputSimple.html
executable file
·53 lines (53 loc) · 2.13 KB
/
jQueryInputSimple.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="The faster, lighter and more secure version of the Bootstrap JavaScript components.">
<meta name="keywords" content="JavaScript,Native JavaScript,native,Bootstrap,plugins,jQuery">
<meta name="author" content="thednp">
<link rel="shortcut icon" href="../../bootstrap.native-master/assets/img/favicon.ico">
<link rel="apple-touch-icon" href="../../bootstrap.native-master/assets/img/apple-touch-icon.png">
<title>jQuery Template</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css">
<link rel="stylesheet" href="../../bootstrap.native-master/assets/css/offcanvas.css">
<link rel="stylesheet" href="../../bootstrap.native-master/assets/css/prism.css">
<link rel="stylesheet" href="../../bootstrap.native-master/assets/css/theme.css">
</head>
<body>
<div class="container">
<div class="row">
<div class="col-1">
</div>
<div class="col-8">
<form>
<div class="form-group">
<label for="exampleInput">JQuery input simple</label>
<input type="text" class="form-control" id="exampleInput" aria-describedby="inputHelp">
<small id="inputHelp" class="form-text text-muted">Lo que escribas aqui se mostrara debajo</small>
</div>
<div>
<span id="contenido"></span>
</div>
</form>
</div>
<div class="col-1">
</div>
</div>
</div>
<script
src="https://code.jquery.com/jquery-3.5.1.min.js"
integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0="
crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap.native@3.0.5/dist/bootstrap-native.min.js" integrity="sha256-CQiZw1XNLEFM6OEgZ8FR1/nTISQD7Y6i7m3beKI2BfM=" crossorigin="anonymous"></script>
<script>
const exampleInput = jQuery('#exampleInput')
exampleInput.on('input', actualiza )
function actualiza() {
jQuery('#contenido').empty().append(exampleInput.val())
}
</script>
</body>
</html>