-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtool2.html
93 lines (89 loc) · 4.82 KB
/
tool2.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>随机抽取器 - 星月编程学习小站</title>
<link rel="stylesheet" href="css/nav.css">
<link rel="stylesheet" href="css/footer.css">
<link rel="stylesheet" href="css/general.css">
<link rel="stylesheet" href="css/tool_common.css">
<script src="js/jquery.js"></script>
<script src="js/nav.js"></script>
<script src="js/footer.js"></script>
<script src="js/tool_common.js"></script>
<script src="js/tool2.js"></script>
</head>
<body>
<div id="ifr">加载中……</div>
<div class="tool_main">
<div class="tool_title">
随机抽取器
</div>
<table class="tool_table_4c">
<tr>
<td>随机方式:</td>
<td><select name="ran_wmode" id="ran_wmode" onclick="sele_ran_wmode()">
<option value="n">常规</option>
<option value="w" selected>加权</option>
</select></td>
<td>是否允许重复:</td>
<td><select name="ran_rep" id="ran_rep" onclick="sele_ran_rep()">
<option value="y">是</option>
<option value="n">否</option>
</select></td>
</tr>
<tr>
<td>抽取次数:</td>
<td><input type="number" min="1" max="99999" value="200" id="ran_num" oninput="sele_ran_num()" /></td>
<td id="ran_fold_text">是否折叠结果:</td>
<td><select name="ran_fold" id="ran_fold" onclick="sele_ran_fold()">
<option value="y">是</option>
<option value="n">否</option>
</select></td>
</tr>
<tr>
<td><input type="button" value="收起帮助" onclick="ran_help()" class="alignlf2" id="ran_help"></td>
<td><input type="button" value="随机抽取" onclick="ran_generate()"></td>
<td colspan="2" class="alignlf"><input type="file" accept=".txt" value="导入抽取项目" id="ran_input" onchange="ran_read(this.files)" id="ran_file"></td>
</tr>
</table>
<div class="tool_help">可以直接在下方抽取项目列表直接添加或编辑要抽取的内容,也可以通过文本导入,导入的文本仅支持纯文本格式。常规模式下,每一行代表一个待抽取项目(不统计空行)。加权模式下每一行以最后一个空格分开两部分,前半部分是待抽取项目,后半部分是权重(数字)。如果没有后半部分,默认权重为1。</div>
<div class="tool_help">抽取项目列表中的权重仅在随机方式为加权时起作用,如果随机方式为常规,那么权重全部都会认为是1,而不是抽取项目列表里的具体值。</div>
<div class="tool_help">当允许重复时,多次抽取的内容可能会出现重复;否则,抽取的内容会保证互不重复。不允许重复时,抽取次数必须不大于项目数目。</div>
<div class="tool_help">允许重复时,如果选择折叠结果,那么所有相同的项目会合并显示并按降序显示;否则会按照抽取到的时间先后显示。</div>
<div class="tool_res_title">
抽取项目列表:
</div>
<table class="tool_table_editable" border="1" cellspacing="0" id="ran_item">
<tr>
<!-- <colgroup></colgroup> -->
<!-- <colgroup></colgroup> -->
<!-- <colgroup class="ts" id="wcx"></colgroup> -->
<th>序号</th>
<th>项目名称</th>
<th id="wwx">权重</th>
<td>
<div class="textbutton" onclick="append_rand_item('')">添加一项</div>
</td>
</tr>
</table>
<!-- <tr>
<td> </td>
<td> </td>
<td>删除该列</td>
</tr> -->
<div class="res_board_1 pad_bottom">
<div class="tool_res_title">
处理结果:
<input type="button" id="clipbut" onclick="clip('clipbut','ran_res')" value="复制到剪贴板">
<input type="button" onclick="save($('#ran_res').val())" value="保存">
</div>
<textarea name="ran_res" id="ran_res" cols="30" rows="22" class="res_text allow_select"></textarea>
</div>
<a onfocus="this.blur();" download="random.txt" id="createInvote" class="hide">random</a>
</div>
<iframe src="footer.html" frameborder="0" width="100%" height="48px" scrolling="no" id="footer_frame" class="footer_frame"></iframe>
</body>
</html>