xxxxxxxxxx
1
<!-- Start your project here-->
2
<div style="height: 100vh">
3
<div class="flex-center flex-column">
4
<!-- Material form contact -->
5
<div class="card">
6
7
<h5 class="card-header info-color white-text text-center py-4">
8
<strong>Contact us</strong>
9
</h5>
10
11
<!--Card content-->
12
<div class="card-body px-lg-5 pt-0">
13
14
<!-- Form -->
15
<form class="text-center" style="color: #757575;" id="xxx">
16
17
<!-- Name -->
18
<div class="md-form mt-3">
19
<input type="text" id="materialContactFormName" class="form-control">
20
<label for="materialContactFormName">Name</label>
21
</div>
22
23
<!-- Send button -->
24
<button class="btn btn-outline-info btn-rounded btn-block z-depth-0 my-4 waves-effect" type="submit">Send</button>
25
26
</form>
27
<!-- Form -->
28
29
30
</div>
31
<div id="root" style="width: 50px; height: 50px; margin:auto;"></div>
32
</div>
33
<!-- Material form contact -->
34
</div>
35
</div>
36
<!-- End your project here-->
1
1
xxxxxxxxxx
1
const xxx = $('#xxx');
2
xxx.on('submit', (e) => {
3
e.preventDefault();
4
const yyy = $('#materialContactFormName').val();
5
$('#root').append(`<p>${yyy}</p>`)
6
7
})
Console errors: 0