-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathindex.html
47 lines (44 loc) · 860 Bytes
/
index.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="printArea">
我是打印内容
<label>
<input type="radio" value="1" name="name">
选项1
</label>
<label>
<input type="radio" value="2" name="name">
选项2
</label>
<label>
<input type="checkbox" value="1" name="name">
选项4
</label>
<label>
<input type="checkbox" value="2" name="name">
选项5
</label>
<br/>
<select>
<option value="1">name1</option>
<option value="2">name2</option>
<option value="3">name3</option>
</select>
<br/>
<textarea></textarea>
</div>
<button id="print" onclick="f()">打印</button>
<script src="./dist/index.js"></script>
<script>
function f() {
var pa = new PrintArea('#printArea');
pa.print();
}
</script>
</body>
</html>