EasyUi 1.4.3 新组件switchbutton,通过点击事件更改label内容!
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
|
<script type=
"text/javascript"
>
$(
function
(){
$(
'#sbutton'
).switchbutton({
checked:
false
,
onChange:
function
(checked){
if
(checked ==
true
){
document.getElementById(
'authenTypeL'
).innerHTML =
'已启用!'
;
return
;
}
if
(checked ==
false
){
document.getElementById(
'authenTypeL'
).innerHTML =
'未启用!'
;
}}
})
})
</script>
<input id=
"sbutton"
style=
"width:70px;height:25px"
>
<label class=
"lblname"
id=
"authenTypeL"
></label>
|
本文转自问道博客51CTO博客,原文链接http://blog.51cto.com/450236/1840367如需转载请自行联系原作者
crackernet