-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.html
More file actions
61 lines (52 loc) · 1.1 KB
/
test.html
File metadata and controls
61 lines (52 loc) · 1.1 KB
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
<!DOCTYPE html>
<html>
<head>
<title>alibaba</title>
<style type="text/css">
/*************
* util
**************/
.clearfix{
*zoom:1;
}
.clearfix:after{
content:"";
display: block;
clear: both;
}
.left{float: left;}
.right{float: right;}
.iconfont{color: red}
textarea {
border: none;
overflow: auto;
outline: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
border: 1px solid gray;
width: 100%;
}
.form{
width: 300px;
}
</style>
</head>
<body>
<section class="form">
<div class="form-info clearfix">
<label for="remark" class="left"><i class="iconfont">*</i>请填写备注</label>
<span class="right">(<span class="count"></span>/200)</span>
</div>
<textarea name="form-input" class="remark" placeholder="最多输入200个字符"></textarea>
<p class="tooltip"></p>
</section>
</body>
<script type="text/javascript">
function handleRemarkChange(e){
var len = $(this).text().length;
if(len>200) $(".count").text("")
}
$(".remark").on("change",handleRemarkChange)
</script>
</html>