-
Notifications
You must be signed in to change notification settings - Fork 0
/
window.print_example_js.html
44 lines (42 loc) · 1.09 KB
/
window.print_example_js.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=h1, initial-scale=1.0">
<title>Document</title>
<style>
h1{
text-align: center;
}
h3{
text-align: center;
}
button{
width: 20vh;
height: 10vh;
display: block;
margin-left: auto;
margin-right: auto;
margin-top: 5vh;
border: none;
padding: 5px;
background-color: white;
box-shadow: rgba(17, 17, 26, 0.05) 0px 1px 0px, rgba(17, 17, 26, 0.1) 0px 0px 8px;
}
i{
color: darkorchid;
}
</style>
</head>
<body>
<h1>Javascript example</h1>
<h3>Print this page using <i> window.print() </i></h3>
<button type="button" onclick="printFunction()">Print</button>
<script>
function printFunction(){
window.print();
}
</script>
</body>
</html>